Manta Developers
GitHub
Menu

Providers

Connect the embedded chat to a Manta deployment and datastore.

What it is

EmbeddedChatProviders is the shell around embedded chat. It supplies the API client and the query cache the chat uses. Requests go to mantaBaseUrl and carry the browser session for that host.

Import

import { EmbeddedChat } from "@manta-eu/react/components/embedded-chat";
import { EmbeddedChatProviders } from "@manta-eu/react/providers";

Example

export function Copilot() {
  return (
    <EmbeddedChatProviders datastoreId="your-datastore">
      <EmbeddedChat
        user={{ id: "…", email: "you@example.com", name: "You" }}
        isOperator={false}
        datastore={{ id: "your-datastore", name: "Your datastore" }}
        assistantName="Copilot"
      />
    </EmbeddedChatProviders>
  );
}

Request

Wrap the chat and pass:

  • datastoreId — the datastore GraphQL and SPARQL from this tree belong to. The chat socket uses the datastore prop on embedded chat, not this id.
  • mantaBaseUrl — the deployment origin. Omit it to use https://app.hiremanta.com.

Response

The chat renders inside the providers. GraphQL and SPARQL from this tree use datastoreId and include the session cookie for mantaBaseUrl. The chat socket uses the datastore prop on EmbeddedChat.