UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

43 lines (42 loc) 1.21 kB
import { jsx as s } from "react/jsx-runtime"; import { useChatState as g } from "./useChatState.js"; import { AgentAccessLevel as m } from "@sage-bionetworks/synapse-types"; import { useState as A } from "react"; import p from "../DraggableDialog/DraggableDialog.js"; import { SynapseChat as x } from "./SynapseChat.js"; function D({ gridSessionId: o, usersReplicaId: n, chatbotName: e = "Grid Assistant", initialMessage: r, open: i, onClose: a, agentRegistrationId: l }) { const [t, c] = A(), f = g(t); return /* @__PURE__ */ s(p, { open: i, onClose: a, title: e, children: /* @__PURE__ */ s( x, { agentRegistrationId: l, chatbotName: e, initialMessage: r, sessionContext: { concreteType: "org.sagebionetworks.repo.model.agent.GridAgentSessionContext", gridSessionId: o, usersReplicaId: n }, textboxPositionOffset: "16px", hideTitle: !0, showAccessLevelMenu: !1, defaultAgentAccessLevel: m.WRITE_YOUR_PRIVATE_DATA, externalSession: t, setExternalSession: c, externalChatState: f } ) }); } export { D as GridAgentChat, D as default }; //# sourceMappingURL=GridAgentChat.js.map