@burdenoff/microfe-botmanor 2026.1118.1 → 2026.1118.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,76 +1,88 @@
1
1
  import { useAssistantRuntimeSetup as e } from "../hooks/useAssistantRuntimeSetup.js";
2
2
  import { useBotlit as t } from "../providers/BotlitProvider.js";
3
- import { Button as n } from "./Button.js";
4
- import { useState as r } from "react";
5
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { graphqlErrorMessage as n } from "../utils/errors.js";
4
+ import { Button as r } from "./Button.js";
5
+ import { useState as i } from "react";
6
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
6
7
  // src/botlit/components/AssistantRuntimeSetupPanel.tsx
7
- function s({ agentId: e, onConfigured: n }) {
8
+ function c({ agentId: e, onConfigured: n }) {
8
9
  let { workspaceId: r, currentUser: i } = t();
9
- return /* @__PURE__ */ a(c, {
10
+ return /* @__PURE__ */ o(l, {
10
11
  agentId: e,
11
12
  onConfigured: n
12
13
  }, `${r}:${i?.id}:${e}`);
13
14
  }
14
- function c({ agentId: t, onConfigured: s }) {
15
- let { connections: c, configure: l } = e(t), [u, d] = r(""), [f, p] = r(""), [m, h] = r(!1);
16
- return /* @__PURE__ */ o("section", {
15
+ function l({ agentId: t, onConfigured: c }) {
16
+ let { connections: l, configure: u } = e(t), [d, f] = i(""), [p, m] = i(""), [h, g] = i(!1);
17
+ return /* @__PURE__ */ s("section", {
17
18
  className: "space-y-4 rounded-lg border border-border-default p-5",
18
19
  children: [
19
- /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("h2", {
20
+ /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("h2", {
20
21
  className: "text-lg font-semibold",
21
22
  children: "Assistant setup"
22
- }), /* @__PURE__ */ a("p", {
23
+ }), /* @__PURE__ */ o("p", {
23
24
  className: "text-sm text-text-secondary",
24
25
  children: "Connect this assistant to Fluidgrids for answers and recovery. Course teachers also receive content ingestion workflows."
25
26
  })] }),
26
- c.isPending ? /* @__PURE__ */ a("p", {
27
+ l.isPending ? /* @__PURE__ */ o("p", {
27
28
  role: "status",
28
29
  children: "Loading connections…"
29
- }) : c.isError ? /* @__PURE__ */ o("div", {
30
+ }) : l.isError ? /* @__PURE__ */ s("div", {
30
31
  role: "alert",
31
- children: [/* @__PURE__ */ a("p", { children: "Connections could not be loaded. Check your access and try again." }), /* @__PURE__ */ a(n, {
32
+ children: [/* @__PURE__ */ o("p", { children: "Connections could not be loaded. Check your access and try again." }), /* @__PURE__ */ o(r, {
32
33
  variant: "outline",
33
- onClick: () => void c.refetch(),
34
+ onClick: () => void l.refetch(),
34
35
  children: "Reload connections"
35
36
  })]
36
- }) : c.data?.length ? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
37
+ }) : l.data?.length ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ s("label", {
37
38
  className: "grid gap-2 text-sm font-medium",
38
- children: ["Workflow connection", /* @__PURE__ */ o("select", {
39
+ children: ["Workflow connection", /* @__PURE__ */ s("select", {
39
40
  className: "h-10 rounded-md border border-border-default bg-bg-surface px-3",
40
- value: u,
41
- disabled: l.isPending,
41
+ value: d,
42
+ disabled: u.isPending,
42
43
  onChange: (e) => {
43
- d(e.target.value), p("");
44
+ f(e.target.value), m("");
44
45
  },
45
- children: [/* @__PURE__ */ a("option", {
46
+ children: [/* @__PURE__ */ o("option", {
46
47
  value: "",
47
48
  children: "Choose a connection"
48
- }), c.data.map((e) => /* @__PURE__ */ a("option", {
49
+ }), l.data.map((e) => /* @__PURE__ */ o("option", {
49
50
  value: e.id,
50
51
  children: e.name
51
52
  }, e.id))]
52
53
  })]
53
- }), /* @__PURE__ */ a(n, {
54
- disabled: !u,
55
- isLoading: l.isPending,
54
+ }), /* @__PURE__ */ o(r, {
55
+ disabled: !d,
56
+ isLoading: u.isPending,
56
57
  onClick: async () => {
57
- p(""), h(!1);
58
+ m(""), g(!1);
58
59
  try {
59
- let e = await l.mutateAsync(u);
60
- p(e.ready ? "Assistant configured and ready." : "Workflows configured. Activate the assistant and finish indexing its knowledge before using it."), s();
61
- } catch {
62
- h(!0), p("Setup could not be completed. Check the model, knowledge scope and your permissions, then try again.");
60
+ let e = await u.mutateAsync(d);
61
+ m(e.ready ? "Assistant configured and ready." : "Workflows configured. Activate the assistant and finish indexing its knowledge before using it."), c();
62
+ } catch (e) {
63
+ g(!0), m(n(e, "Setup could not be completed. Check the model, knowledge scope and your permissions, then try again."));
63
64
  }
64
65
  },
65
66
  children: "Configure assistant"
66
- })] }) : /* @__PURE__ */ a("p", { children: "Create an active BotManor Assistant Runtime connection in Integrations, then reload this page." }),
67
- f && /* @__PURE__ */ a("p", {
68
- role: m ? "alert" : "status",
69
- children: f
67
+ })] }) : /* @__PURE__ */ s("div", {
68
+ className: "space-y-2 text-sm",
69
+ children: [
70
+ /* @__PURE__ */ o("p", { children: "This workspace has no BotManor Assistant Runtime connection yet. The runtime lets FluidGrids answer questions and process knowledge imports for this assistant." }),
71
+ /* @__PURE__ */ o("p", { children: "In Integrations, connect “BotManor Assistant Runtime”, then select “Reload connections”." }),
72
+ /* @__PURE__ */ o(r, {
73
+ variant: "outline",
74
+ onClick: () => void l.refetch(),
75
+ children: "Reload connections"
76
+ })
77
+ ]
78
+ }),
79
+ p && /* @__PURE__ */ o("p", {
80
+ role: h ? "alert" : "status",
81
+ children: p
70
82
  })
71
83
  ]
72
84
  });
73
85
  }
74
- export { s as AssistantRuntimeSetupPanel };
86
+ export { c as AssistantRuntimeSetupPanel };
75
87
 
76
88
  //# sourceMappingURL=AssistantRuntimeSetupPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantRuntimeSetupPanel.js","names":["_Fragment","Fragment$1","AssistantRuntimeSetupPanel","useBotlit","ScopedSetupPanel","workspaceId","currentUser","agentId","useAssistantRuntimeSetup","selected","setSelected","useState","message","setMessage","failed","setFailed","connections","Button","configure","event","connection","result","onConfigured"],"sources":["../../../src/botlit/components/AssistantRuntimeSetupPanel.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useAssistantRuntimeSetup } from '../hooks/useAssistantRuntimeSetup';\nimport { useBotlit } from '../providers/BotlitProvider';\nimport { Button } from './Button';\n\nexport function AssistantRuntimeSetupPanel({\n agentId,\n onConfigured,\n}: {\n agentId: string;\n onConfigured: () => void;\n}) {\n const { workspaceId, currentUser } = useBotlit();\n return (\n <ScopedSetupPanel\n key={`${workspaceId}:${currentUser?.id}:${agentId}`}\n agentId={agentId}\n onConfigured={onConfigured}\n />\n );\n}\n\nfunction ScopedSetupPanel({\n agentId,\n onConfigured,\n}: {\n agentId: string;\n onConfigured: () => void;\n}) {\n const { connections, configure } = useAssistantRuntimeSetup(agentId);\n const [selected, setSelected] = useState('');\n const [message, setMessage] = useState('');\n const [failed, setFailed] = useState(false);\n return (\n <section className=\"space-y-4 rounded-lg border border-border-default p-5\">\n <div>\n <h2 className=\"text-lg font-semibold\">Assistant setup</h2>\n <p className=\"text-sm text-text-secondary\">\n Connect this assistant to Fluidgrids for answers and recovery. Course teachers also\n receive content ingestion workflows.\n </p>\n </div>\n {connections.isPending ? (\n <p role=\"status\">Loading connections…</p>\n ) : connections.isError ? (\n <div role=\"alert\">\n <p>Connections could not be loaded. Check your access and try again.</p>\n <Button variant=\"outline\" onClick={() => void connections.refetch()}>\n Reload connections\n </Button>\n </div>\n ) : !connections.data?.length ? (\n <p>\n Create an active BotManor Assistant Runtime connection in Integrations, then reload this\n page.\n </p>\n ) : (\n <>\n <label className=\"grid gap-2 text-sm font-medium\">\n Workflow connection\n <select\n className=\"h-10 rounded-md border border-border-default bg-bg-surface px-3\"\n value={selected}\n disabled={configure.isPending}\n onChange={(event) => {\n setSelected(event.target.value);\n setMessage('');\n }}\n >\n <option value=\"\">Choose a connection</option>\n {connections.data.map((connection) => (\n <option key={connection.id} value={connection.id}>\n {connection.name}\n </option>\n ))}\n </select>\n </label>\n <Button\n disabled={!selected}\n isLoading={configure.isPending}\n onClick={async () => {\n setMessage('');\n setFailed(false);\n try {\n const result = await configure.mutateAsync(selected);\n setMessage(\n result.ready\n ? 'Assistant configured and ready.'\n : 'Workflows configured. Activate the assistant and finish indexing its knowledge before using it.'\n );\n onConfigured();\n } catch {\n setFailed(true);\n setMessage(\n 'Setup could not be completed. Check the model, knowledge scope and your permissions, then try again.'\n );\n }\n }}\n >\n Configure assistant\n </Button>\n </>\n )}\n {message && <p role={failed ? 'alert' : 'status'}>{message}</p>}\n </section>\n );\n}\n"],"mappings":";;;;;;AAKA,SAAgBE,EAA2B,EACzC,YACA,mBAIC;CACD,IAAM,EAAE,gBAAa,mBAAgBC,EAAU;CAC/C,OACE,kBAACC,GAAD;EAEW;EACK;CACf,GAHM,GAAGC,EAAY,GAAGC,GAAa,GAAG,GAAGC,GAG3C;AAEL;AAEA,SAASH,EAAiB,EACxB,YACA,mBAIC;CACD,IAAM,EAAE,gBAAa,iBAAcI,EAAyBD,CAAO,GAC7D,CAACE,GAAUC,KAAeC,EAAS,EAAE,GACrC,CAACC,GAASC,KAAcF,EAAS,EAAE,GACnC,CAACG,GAAQC,KAAaJ,EAAS,EAAK;CAC1C,OACE,kBAAC,WAAD;EAAS,WAAU;EAAnB,UAAA;GACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;IAAwB,UAAA;GAAmB,CAAA,GACzD,kBAAC,KAAD;IAAG,WAAU;IAA8B,UAAA;GAGxC,CAAA,CACA,EAAA,CAAA;GACJK,EAAY,YACX,kBAAC,KAAD;IAAG,MAAK;IAAS,UAAA;GAAuB,CAAA,IACtCA,EAAY,UACd,kBAAC,OAAD;IAAK,MAAK;IAAV,UAAA,CACE,kBAAC,KAAD,EAAA,UAAG,oEAAoE,CAAA,GACvE,kBAACC,GAAD;KAAQ,SAAQ;KAAU,eAAe,KAAKD,EAAY,QAAQ;KAAG,UAAA;IAE7D,CAAA,CACL;GACH,CAAA,IAACA,EAAY,MAAM,SAMrB,kBAAAhB,GAAA,EAAA,UAAA,CACE,kBAAC,SAAD;IAAO,WAAU;IAAjB,UAAA,CAAkD,uBAEhD,kBAAC,UAAD;KACE,WAAU;KACV,OAAOS;KACP,UAAUS,EAAU;KACpB,WAAW,MAAU;MAEnB,AADAR,EAAYS,EAAM,OAAO,KAAK,GAC9BN,EAAW,EAAE;KACf;KAPF,UAAA,CASE,kBAAC,UAAD;MAAQ,OAAM;MAAG,UAAA;KAA2B,CAAA,GAC3CG,EAAY,KAAK,KAAK,MACrB,kBAAC,UAAD;MAA4B,OAAOI,EAAW;MAC3C,UAAAA,EAAW;KACN,GAFKA,EAAW,EAEhB,CACT,CACK;IACH,CAAA,CAAA;GACP,CAAA,GAAA,kBAACH,GAAD;IACE,UAAU,CAACR;IACX,WAAWS,EAAU;IACrB,SAAS,YAAY;KAEnB,AADAL,EAAW,EAAE,GACbE,EAAU,EAAK;KACf,IAAI;MACF,IAAMM,IAAS,MAAMH,EAAU,YAAYT,CAAQ;MAMnD,AALAI,EACEQ,EAAO,QACH,oCACA,iGACN,GACAC,EAAa;KACf,QAAQ;MAEN,AADAP,EAAU,EAAI,GACdF,EACE,sGACF;KACF;IACF;IACD,UAAA;GAEO,CAAA,CACR,EAAA,CAAA,IAjDF,kBAAC,KAAD,EAAA,UAAG,iGAGA,CAAA;GAgDJD,KAAW,kBAAC,KAAD;IAAG,MAAME,IAAS,UAAU;IAAW,UAAAF;GAAW,CAAA;EACvD;;AAEb"}
1
+ {"version":3,"file":"AssistantRuntimeSetupPanel.js","names":["_Fragment","Fragment$1","AssistantRuntimeSetupPanel","useBotlit","ScopedSetupPanel","workspaceId","currentUser","agentId","useAssistantRuntimeSetup","selected","setSelected","useState","message","setMessage","failed","setFailed","connections","Button","configure","event","connection","result","onConfigured","error","graphqlErrorMessage"],"sources":["../../../src/botlit/components/AssistantRuntimeSetupPanel.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useAssistantRuntimeSetup } from '../hooks/useAssistantRuntimeSetup';\nimport { useBotlit } from '../providers/BotlitProvider';\nimport { graphqlErrorMessage } from '../utils/errors';\nimport { Button } from './Button';\n\nexport function AssistantRuntimeSetupPanel({\n agentId,\n onConfigured,\n}: {\n agentId: string;\n onConfigured: () => void;\n}) {\n const { workspaceId, currentUser } = useBotlit();\n return (\n <ScopedSetupPanel\n key={`${workspaceId}:${currentUser?.id}:${agentId}`}\n agentId={agentId}\n onConfigured={onConfigured}\n />\n );\n}\n\nfunction ScopedSetupPanel({\n agentId,\n onConfigured,\n}: {\n agentId: string;\n onConfigured: () => void;\n}) {\n const { connections, configure } = useAssistantRuntimeSetup(agentId);\n const [selected, setSelected] = useState('');\n const [message, setMessage] = useState('');\n const [failed, setFailed] = useState(false);\n return (\n <section className=\"space-y-4 rounded-lg border border-border-default p-5\">\n <div>\n <h2 className=\"text-lg font-semibold\">Assistant setup</h2>\n <p className=\"text-sm text-text-secondary\">\n Connect this assistant to Fluidgrids for answers and recovery. Course teachers also\n receive content ingestion workflows.\n </p>\n </div>\n {connections.isPending ? (\n <p role=\"status\">Loading connections…</p>\n ) : connections.isError ? (\n <div role=\"alert\">\n <p>Connections could not be loaded. Check your access and try again.</p>\n <Button variant=\"outline\" onClick={() => void connections.refetch()}>\n Reload connections\n </Button>\n </div>\n ) : !connections.data?.length ? (\n <div className=\"space-y-2 text-sm\">\n <p>\n This workspace has no BotManor Assistant Runtime connection yet. The runtime lets\n FluidGrids answer questions and process knowledge imports for this assistant.\n </p>\n <p>\n In Integrations, connect “BotManor Assistant Runtime”, then select “Reload connections”.\n </p>\n <Button variant=\"outline\" onClick={() => void connections.refetch()}>\n Reload connections\n </Button>\n </div>\n ) : (\n <>\n <label className=\"grid gap-2 text-sm font-medium\">\n Workflow connection\n <select\n className=\"h-10 rounded-md border border-border-default bg-bg-surface px-3\"\n value={selected}\n disabled={configure.isPending}\n onChange={(event) => {\n setSelected(event.target.value);\n setMessage('');\n }}\n >\n <option value=\"\">Choose a connection</option>\n {connections.data.map((connection) => (\n <option key={connection.id} value={connection.id}>\n {connection.name}\n </option>\n ))}\n </select>\n </label>\n <Button\n disabled={!selected}\n isLoading={configure.isPending}\n onClick={async () => {\n setMessage('');\n setFailed(false);\n try {\n const result = await configure.mutateAsync(selected);\n setMessage(\n result.ready\n ? 'Assistant configured and ready.'\n : 'Workflows configured. Activate the assistant and finish indexing its knowledge before using it.'\n );\n onConfigured();\n } catch (error) {\n setFailed(true);\n // The service names what is missing (model, provider key, connection or FluidGrids step).\n setMessage(\n graphqlErrorMessage(\n error,\n 'Setup could not be completed. Check the model, knowledge scope and your permissions, then try again.'\n )\n );\n }\n }}\n >\n Configure assistant\n </Button>\n </>\n )}\n {message && <p role={failed ? 'alert' : 'status'}>{message}</p>}\n </section>\n );\n}\n"],"mappings":";;;;;;;AAMA,SAAgBE,EAA2B,EACzC,YACA,mBAIC;CACD,IAAM,EAAE,gBAAa,mBAAgBC,EAAU;CAC/C,OACE,kBAACC,GAAD;EAEW;EACK;CACf,GAHM,GAAGC,EAAY,GAAGC,GAAa,GAAG,GAAGC,GAG3C;AAEL;AAEA,SAASH,EAAiB,EACxB,YACA,mBAIC;CACD,IAAM,EAAE,gBAAa,iBAAcI,EAAyBD,CAAO,GAC7D,CAACE,GAAUC,KAAeC,EAAS,EAAE,GACrC,CAACC,GAASC,KAAcF,EAAS,EAAE,GACnC,CAACG,GAAQC,KAAaJ,EAAS,EAAK;CAC1C,OACE,kBAAC,WAAD;EAAS,WAAU;EAAnB,UAAA;GACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;IAAwB,UAAA;GAAmB,CAAA,GACzD,kBAAC,KAAD;IAAG,WAAU;IAA8B,UAAA;GAGxC,CAAA,CACA,EAAA,CAAA;GACJK,EAAY,YACX,kBAAC,KAAD;IAAG,MAAK;IAAS,UAAA;GAAuB,CAAA,IACtCA,EAAY,UACd,kBAAC,OAAD;IAAK,MAAK;IAAV,UAAA,CACE,kBAAC,KAAD,EAAA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UAAU;IAAW,UAAAF;GAAW,CAAA;EACvD;;AAEb"}
@@ -1,134 +1,155 @@
1
1
  import { useKnowledgeSourceImports as e } from "../hooks/useKnowledgeSourceImports.js";
2
2
  import { useBotlit as t } from "../providers/BotlitProvider.js";
3
- import { Button as n } from "./Button.js";
4
- import { useRef as r, useState as i } from "react";
5
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { graphqlErrorMessage as n } from "../utils/errors.js";
4
+ import { knowledgeImportStatus as r } from "../utils/knowledgeImportStatus.js";
5
+ import { Button as i } from "./Button.js";
6
+ import { useRef as a, useState as o } from "react";
7
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
8
  // src/botlit/components/KnowledgeSourceImportPanel.tsx
7
- function s({ knowledgeBaseId: e }) {
9
+ var l = {
10
+ info: "text-text-secondary",
11
+ success: "text-status-success-text",
12
+ warning: "text-status-warning-text",
13
+ error: "text-status-error-text"
14
+ };
15
+ function u({ knowledgeBaseId: e }) {
8
16
  let { workspaceId: n, currentUser: r } = t();
9
- return /* @__PURE__ */ a(c, { knowledgeBaseId: e }, `${n}:${r?.id}:${e}`);
17
+ return /* @__PURE__ */ s(d, { knowledgeBaseId: e }, `${n}:${r?.id}:${e}`);
10
18
  }
11
- function c({ knowledgeBaseId: t }) {
12
- let s = e(t), [c, l] = i("website"), [u, d] = i(""), [f, p] = i(""), [m, h] = i(""), g = r(null);
13
- return /* @__PURE__ */ o("section", {
19
+ function d({ knowledgeBaseId: t }) {
20
+ let u = e(t), [d, f] = o("website"), [p, m] = o(""), [h, g] = o(""), [_, v] = o(""), y = a(null);
21
+ return /* @__PURE__ */ c("section", {
14
22
  className: "space-y-4 rounded-lg border border-border-default p-5",
15
23
  children: [
16
- /* @__PURE__ */ a("h2", {
24
+ /* @__PURE__ */ s("h2", {
17
25
  className: "text-lg font-semibold",
18
26
  children: "Import website or text knowledge"
19
27
  }),
20
- /* @__PURE__ */ a("p", {
28
+ /* @__PURE__ */ s("p", {
21
29
  className: "text-sm text-text-secondary",
22
30
  children: "Fluidgrids captures each source and checkpoints embedding batches. Course content uses the BuildMyIQ course import. Use a new knowledge base for the first managed import."
23
31
  }),
24
- /* @__PURE__ */ o("label", {
32
+ /* @__PURE__ */ c("label", {
25
33
  className: "grid gap-2 text-sm",
26
- children: ["Source type", /* @__PURE__ */ o("select", {
34
+ children: ["Source type", /* @__PURE__ */ c("select", {
27
35
  className: "h-10 rounded-md border border-border-default bg-bg-surface px-3",
28
- value: c,
29
- disabled: s.queue.isPending,
36
+ value: d,
37
+ disabled: u.queue.isPending,
30
38
  onChange: (e) => {
31
- l(e.target.value), p("");
39
+ f(e.target.value), g("");
32
40
  },
33
- children: [/* @__PURE__ */ a("option", {
41
+ children: [/* @__PURE__ */ s("option", {
34
42
  value: "website",
35
43
  children: "Public website page"
36
- }), /* @__PURE__ */ a("option", {
44
+ }), /* @__PURE__ */ s("option", {
37
45
  value: "text",
38
46
  children: "Text or Markdown"
39
47
  })]
40
48
  })]
41
49
  }),
42
- /* @__PURE__ */ o("label", {
50
+ /* @__PURE__ */ c("label", {
43
51
  className: "grid gap-2 text-sm",
44
- children: ["Title", /* @__PURE__ */ a("input", {
52
+ children: ["Title", /* @__PURE__ */ s("input", {
45
53
  className: "h-10 rounded-md border border-border-default bg-bg-surface px-3",
46
- value: u,
54
+ value: p,
47
55
  maxLength: 255,
48
- disabled: s.queue.isPending,
49
- onChange: (e) => d(e.target.value)
56
+ disabled: u.queue.isPending,
57
+ onChange: (e) => m(e.target.value)
50
58
  })]
51
59
  }),
52
- /* @__PURE__ */ o("label", {
60
+ /* @__PURE__ */ c("label", {
53
61
  className: "grid gap-2 text-sm",
54
- children: [c === "website" ? "Exact public HTTPS page" : "Source text", /* @__PURE__ */ a("textarea", {
62
+ children: [d === "website" ? "Exact public HTTPS page" : "Source text", /* @__PURE__ */ s("textarea", {
55
63
  className: "rounded-md border border-border-default bg-bg-surface p-3",
56
- rows: c === "website" ? 2 : 6,
57
- value: f,
58
- disabled: s.queue.isPending,
59
- onChange: (e) => p(e.target.value)
64
+ rows: d === "website" ? 2 : 6,
65
+ value: h,
66
+ disabled: u.queue.isPending,
67
+ onChange: (e) => g(e.target.value)
60
68
  })]
61
69
  }),
62
- /* @__PURE__ */ a("p", {
70
+ /* @__PURE__ */ s("p", {
63
71
  className: "text-sm text-text-secondary",
64
72
  children: "Website imports capture one static page without signing in. Cross-origin redirects and embedded documents are rejected. Text sources must fit within 240 KiB; split larger sources."
65
73
  }),
66
- /* @__PURE__ */ a(n, {
67
- disabled: !u.trim() || !f.trim(),
68
- isLoading: s.queue.isPending,
74
+ /* @__PURE__ */ s(i, {
75
+ disabled: !p.trim() || !h.trim(),
76
+ isLoading: u.queue.isPending,
69
77
  onClick: async () => {
70
- if (c === "text" && new TextEncoder().encode(f).length > 245760 || c === "website" && f.length > 2048) {
71
- h("The source is too large. Split it into smaller sources.");
78
+ if (d === "text" && new TextEncoder().encode(h).length > 245760 || d === "website" && h.length > 2048) {
79
+ v("The source is too large. Split it into smaller sources.");
72
80
  return;
73
81
  }
74
82
  let e = JSON.stringify([
75
- c,
76
- u,
77
- f
83
+ d,
84
+ p,
85
+ h
78
86
  ]);
79
- g.current?.fingerprint !== e && (g.current = {
87
+ y.current?.fingerprint !== e && (y.current = {
80
88
  id: crypto.randomUUID(),
81
89
  fingerprint: e
82
90
  });
83
91
  try {
84
- await s.queue.mutateAsync({
85
- clientRequestId: g.current.id,
86
- title: u,
87
- ...c === "website" ? { sourceUrl: f.trim() } : { content: f }
88
- }), g.current = null, p(""), h("Source queued. Its progress will appear below.");
89
- } catch {
90
- h("Admission could not be confirmed. Retry the same source to reuse its request ID. Check the source, embedding configuration and management permission.");
92
+ await u.queue.mutateAsync({
93
+ clientRequestId: y.current.id,
94
+ title: p,
95
+ ...d === "website" ? { sourceUrl: h.trim() } : { content: h }
96
+ }), y.current = null, g(""), v("Source queued. Its progress will appear below.");
97
+ } catch (e) {
98
+ v(n(e, "Admission could not be confirmed. Retry the same source to reuse its request ID. Check the source, embedding configuration and management permission."));
91
99
  }
92
100
  },
93
101
  children: "Queue import"
94
102
  }),
95
- m && /* @__PURE__ */ a("p", {
103
+ _ && /* @__PURE__ */ s("p", {
96
104
  role: "status",
97
- children: m
105
+ children: _
98
106
  }),
99
- s.imports.isError ? /* @__PURE__ */ a("p", {
107
+ u.imports.isError ? /* @__PURE__ */ s("p", {
100
108
  role: "alert",
101
109
  children: "Imports could not be loaded. Knowledge management permission is required."
102
- }) : s.imports.isPending ? /* @__PURE__ */ a("p", {
110
+ }) : u.imports.isPending ? /* @__PURE__ */ s("p", {
103
111
  role: "status",
104
112
  children: "Loading imports…"
105
- }) : s.imports.data?.map((e) => /* @__PURE__ */ o("div", {
106
- className: "flex items-center justify-between gap-3 text-sm",
107
- children: [/* @__PURE__ */ o("span", { children: [
108
- e.title,
109
- " · ",
110
- e.status.toLowerCase()
111
- ] }), e.status === "BLOCKED" && /* @__PURE__ */ a(n, {
112
- variant: "outline",
113
- isLoading: s.retry.isPending,
114
- onClick: async () => {
115
- try {
116
- await s.retry.mutateAsync(e.id), h("Import recovery queued.");
117
- } catch {
118
- h("Recovery failed. The embedding profile must still match the original import.");
119
- }
120
- },
121
- children: "Retry import"
122
- })]
123
- }, e.id)),
124
- /* @__PURE__ */ a(n, {
113
+ }) : u.imports.data?.map((e) => {
114
+ let t = r(e);
115
+ return /* @__PURE__ */ c("div", {
116
+ className: "flex items-start justify-between gap-3 text-sm",
117
+ children: [/* @__PURE__ */ c("div", {
118
+ className: "grid gap-1",
119
+ children: [/* @__PURE__ */ c("span", { children: [
120
+ e.title,
121
+ " · ",
122
+ /* @__PURE__ */ s("span", {
123
+ className: l[t.tone],
124
+ children: t.label
125
+ })
126
+ ] }), t.detail && /* @__PURE__ */ s("span", {
127
+ role: t.tone === "error" || t.tone === "warning" ? "alert" : void 0,
128
+ className: "text-text-secondary",
129
+ children: t.detail
130
+ })]
131
+ }), e.status === "BLOCKED" && /* @__PURE__ */ s(i, {
132
+ variant: "outline",
133
+ isLoading: u.retry.isPending,
134
+ onClick: async () => {
135
+ try {
136
+ await u.retry.mutateAsync(e.id), v("Import recovery queued.");
137
+ } catch (e) {
138
+ v(n(e, "Recovery failed. The embedding profile must still match the original import."));
139
+ }
140
+ },
141
+ children: "Retry import"
142
+ })]
143
+ }, e.id);
144
+ }),
145
+ /* @__PURE__ */ s(i, {
125
146
  variant: "outline",
126
- onClick: () => void s.imports.refetch(),
147
+ onClick: () => void u.imports.refetch(),
127
148
  children: "Refresh imports"
128
149
  })
129
150
  ]
130
151
  });
131
152
  }
132
- export { s as KnowledgeSourceImportPanel };
153
+ export { u as KnowledgeSourceImportPanel };
133
154
 
134
155
  //# sourceMappingURL=KnowledgeSourceImportPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"KnowledgeSourceImportPanel.js","names":["KnowledgeSourceImportPanel","useBotlit","ScopedImportPanel","workspaceId","currentUser","knowledgeBaseId","sources","useKnowledgeSourceImports","kind","setKind","useState","title","setTitle","value","setValue","message","setMessage","pending","useRef","event","Button","fingerprint","row"],"sources":["../../../src/botlit/components/KnowledgeSourceImportPanel.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { useKnowledgeSourceImports } from '../hooks/useKnowledgeSourceImports';\nimport { useBotlit } from '../providers/BotlitProvider';\nimport { Button } from './Button';\n\nexport function KnowledgeSourceImportPanel({ knowledgeBaseId }: { knowledgeBaseId: string }) {\n const { workspaceId, currentUser } = useBotlit();\n return (\n <ScopedImportPanel\n key={`${workspaceId}:${currentUser?.id}:${knowledgeBaseId}`}\n knowledgeBaseId={knowledgeBaseId}\n />\n );\n}\nfunction ScopedImportPanel({ knowledgeBaseId }: { knowledgeBaseId: string }) {\n const sources = useKnowledgeSourceImports(knowledgeBaseId);\n const [kind, setKind] = useState('website'),\n [title, setTitle] = useState(''),\n [value, setValue] = useState(''),\n [message, setMessage] = useState('');\n const pending = useRef<{ id: string; fingerprint: string } | null>(null);\n return (\n <section className=\"space-y-4 rounded-lg border border-border-default p-5\">\n <h2 className=\"text-lg font-semibold\">Import website or text knowledge</h2>\n <p className=\"text-sm text-text-secondary\">\n Fluidgrids captures each source and checkpoints embedding batches. Course content uses the\n BuildMyIQ course import. Use a new knowledge base for the first managed import.\n </p>\n <label className=\"grid gap-2 text-sm\">\n Source type\n <select\n className=\"h-10 rounded-md border border-border-default bg-bg-surface px-3\"\n value={kind}\n disabled={sources.queue.isPending}\n onChange={(event) => {\n setKind(event.target.value);\n setValue('');\n }}\n >\n <option value=\"website\">Public website page</option>\n <option value=\"text\">Text or Markdown</option>\n </select>\n </label>\n <label className=\"grid gap-2 text-sm\">\n Title\n <input\n className=\"h-10 rounded-md border border-border-default bg-bg-surface px-3\"\n value={title}\n maxLength={255}\n disabled={sources.queue.isPending}\n onChange={(event) => setTitle(event.target.value)}\n />\n </label>\n <label className=\"grid gap-2 text-sm\">\n {kind === 'website' ? 'Exact public HTTPS page' : 'Source text'}\n <textarea\n className=\"rounded-md border border-border-default bg-bg-surface p-3\"\n rows={kind === 'website' ? 2 : 6}\n value={value}\n disabled={sources.queue.isPending}\n onChange={(event) => setValue(event.target.value)}\n />\n </label>\n <p className=\"text-sm text-text-secondary\">\n Website imports capture one static page without signing in. Cross-origin redirects and\n embedded documents are rejected. Text sources must fit within 240 KiB; split larger sources.\n </p>\n <Button\n disabled={!title.trim() || !value.trim()}\n isLoading={sources.queue.isPending}\n onClick={async () => {\n if (\n (kind === 'text' && new TextEncoder().encode(value).length > 245760) ||\n (kind === 'website' && value.length > 2048)\n ) {\n setMessage('The source is too large. Split it into smaller sources.');\n return;\n }\n const fingerprint = JSON.stringify([kind, title, value]);\n if (pending.current?.fingerprint !== fingerprint)\n pending.current = { id: crypto.randomUUID(), fingerprint };\n try {\n await sources.queue.mutateAsync({\n clientRequestId: pending.current.id,\n title,\n ...(kind === 'website' ? { sourceUrl: value.trim() } : { content: value }),\n });\n pending.current = null;\n setValue('');\n setMessage('Source queued. Its progress will appear below.');\n } catch {\n setMessage(\n 'Admission could not be confirmed. Retry the same source to reuse its request ID. Check the source, embedding configuration and management permission.'\n );\n }\n }}\n >\n Queue import\n </Button>\n {message && <p role=\"status\">{message}</p>}\n {sources.imports.isError ? (\n <p role=\"alert\">\n Imports could not be loaded. Knowledge management permission is required.\n </p>\n ) : sources.imports.isPending ? (\n <p role=\"status\">Loading imports…</p>\n ) : (\n sources.imports.data?.map((row) => (\n <div key={row.id} className=\"flex items-center justify-between gap-3 text-sm\">\n <span>\n {row.title} · {row.status.toLowerCase()}\n </span>\n {row.status === 'BLOCKED' && (\n <Button\n variant=\"outline\"\n isLoading={sources.retry.isPending}\n onClick={async () => {\n try {\n await sources.retry.mutateAsync(row.id);\n setMessage('Import recovery queued.');\n } catch {\n setMessage(\n 'Recovery failed. The embedding profile must still match the original import.'\n );\n }\n }}\n >\n Retry import\n </Button>\n )}\n </div>\n ))\n )}\n <Button variant=\"outline\" onClick={() => void sources.imports.refetch()}>\n Refresh imports\n </Button>\n </section>\n );\n}\n"],"mappings":";;;;;;AAKA,SAAgBA,EAA2B,EAAE,sBAAgD;CAC3F,IAAM,EAAE,gBAAa,mBAAgBC,EAAU;CAC/C,OACE,kBAACC,GAAD,EAEmB,mBAClB,GAFM,GAAGC,EAAY,GAAGC,GAAa,GAAG,GAAGC,GAE3C;AAEL;AACA,SAASH,EAAkB,EAAE,sBAAgD;CAC3E,IAAMI,IAAUC,EAA0BF,CAAe,GACnD,CAACG,GAAMC,KAAWC,EAAS,SAAS,GACxC,CAACC,GAAOC,KAAYF,EAAS,EAAE,GAC/B,CAACG,GAAOC,KAAYJ,EAAS,EAAE,GAC/B,CAACK,GAASC,KAAcN,EAAS,EAAE,GAC/BO,IAAUC,EAAmD,IAAI;CACvE,OACE,kBAAC,WAAD;EAAS,WAAU;EAAnB,UAAA;GACE,kBAAC,MAAD;IAAI,WAAU;IAAwB,UAAA;GAAoC,CAAA;GAC1E,kBAAC,KAAD;IAAG,WAAU;IAA8B,UAAA;GAGxC,CAAA;GACH,k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AY;KAC3D,IAAI;MAQF,AAPA,MAAMf,EAAQ,MAAM,YAAY;OAC9B,iBAAiBW,EAAQ,QAAQ;OACjC;OACA,GAAIT,MAAS,YAAY,EAAE,WAAWK,EAAM,KAAK,EAAE,IAAI,EAAE,SAASA,EAAM;MAC1E,CAAC,GACD,EAAQ,UAAU,MAClBC,EAAS,EAAE,GACXE,EAAW,gDAAgD;KAC7D,QAAQ;MACN,EACE,uJACF;KACF;IACF;IACD,UAAA;GAEO,CAAA;GACPD,KAAW,kBAAC,KAAD;IAAG,MAAK;IAAU,UAAAA;GAAW,CAAA;GACxCT,EAAQ,QAAQ,UACf,kBAAC,KAAD;IAAG,MAAK;IAAQ,UAAA;GAEb,CAAA,IACDA,EAAQ,QAAQ,YAClB,kBAAC,KAAD;IAAG,MAAK;IAAS,UAAA;GAAmB,CAAA,IAEpCA,EAAQ,QAAQ,MAAM,KAAK,MACzB,kBAAC,OAAD;IAAkB,WAAU;IAA5B,UAAA,CACE,kBAAC,QAAD,EAAA,UAAA;KACGgB,EAAI;KAAM;KAAIA,EAAI,OAAO,YAAY;IAClC,EAAA,CAAA,GACLA,EAAI,WAAW,aACd,kBAACF,GAAD;KACE,SAAQ;KACR,WAAWd,EAAQ,MAAM;KACzB,SAAS,YAAY;MACnB,IAAI;OAEF,AADA,MAAMA,EAAQ,MAAM,YAAYgB,EAAI,EAAE,GACtCN,EAAW,yBAAyB;MACtC,QAAQ;OACN,EACE,8EACF;MACF;KACF;KACD,UAAA;IAEO,CAAA,CAEP;GAtBK,GAAAM,EAAI,EAsBT,CACN;GAEH,kBAACF,GAAD;IAAQ,SAAQ;IAAU,eAAe,KAAKd,EAAQ,QAAQ,QAAQ;IAAG,UAAA;GAEjE,CAAA;EACD;;AAEb"}
1
+ {"version":3,"file":"KnowledgeSourceImportPanel.js","names":["TONE_CLASS","KnowledgeSourceImportPanel","useBotlit","ScopedImportPanel","workspaceId","currentUser","knowledgeBaseId","sources","useKnowledgeSourceImports","kind","setKind","useState","title","setTitle","value","setValue","message","setMessage","pending","useRef","event","Button","fingerprint","error","graphqlErrorMessage","status","knowledgeImportStatus","row"],"sources":["../../../src/botlit/components/KnowledgeSourceImportPanel.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { useKnowledgeSourceImports } from '../hooks/useKnowledgeSourceImports';\nimport { useBotlit } from '../providers/BotlitProvider';\nimport { graphqlErrorMessage } from '../utils/errors';\nimport { knowledgeImportStatus } from '../utils/knowledgeImportStatus';\nimport { Button } from './Button';\n\nconst TONE_CLASS = {\n info: 'text-text-secondary',\n success: 'text-status-success-text',\n warning: 'text-status-warning-text',\n error: 'text-status-error-text',\n} as const;\n\nexport function KnowledgeSourceImportPanel({ knowledgeBaseId }: { knowledgeBaseId: string }) {\n const { workspaceId, currentUser } = useBotlit();\n return (\n <ScopedImportPanel\n key={`${workspaceId}:${currentUser?.id}:${knowledgeBaseId}`}\n knowledgeBaseId={knowledgeBaseId}\n />\n );\n}\nfunction ScopedImportPanel({ knowledgeBaseId }: { knowledgeBaseId: string }) {\n const sources = useKnowledgeSourceImports(knowledgeBaseId);\n const [kind, setKind] = useState('website'),\n [title, setTitle] = useState(''),\n [value, setValue] = useState(''),\n [message, setMessage] = useState('');\n const pending = useRef<{ id: string; fingerprint: string } | null>(null);\n return (\n <section className=\"space-y-4 rounded-lg border border-border-default p-5\">\n <h2 className=\"text-lg font-semibold\">Import website or text knowledge</h2>\n <p className=\"text-sm text-text-secondary\">\n Fluidgrids captures each source and checkpoints embedding batches. Course content uses the\n BuildMyIQ course import. Use a new knowledge base for the first managed import.\n </p>\n <label className=\"grid gap-2 text-sm\">\n Source type\n <select\n className=\"h-10 rounded-md border border-border-default bg-bg-surface px-3\"\n value={kind}\n disabled={sources.queue.isPending}\n onChange={(event) => {\n setKind(event.target.value);\n setValue('');\n }}\n >\n <option value=\"website\">Public website page</option>\n <option value=\"text\">Text or Markdown</option>\n </select>\n </label>\n <label className=\"grid gap-2 text-sm\">\n Title\n <input\n className=\"h-10 rounded-md border border-border-default bg-bg-surface px-3\"\n value={title}\n maxLength={255}\n disabled={sources.queue.isPending}\n onChange={(event) => setTitle(event.target.value)}\n />\n </label>\n <label className=\"grid gap-2 text-sm\">\n {kind === 'website' ? 'Exact public HTTPS page' : 'Source text'}\n <textarea\n className=\"rounded-md border border-border-default bg-bg-surface p-3\"\n rows={kind === 'website' ? 2 : 6}\n value={value}\n disabled={sources.queue.isPending}\n onChange={(event) => setValue(event.target.value)}\n />\n </label>\n <p className=\"text-sm text-text-secondary\">\n Website imports capture one static page without signing in. Cross-origin redirects and\n embedded documents are rejected. Text sources must fit within 240 KiB; split larger sources.\n </p>\n <Button\n disabled={!title.trim() || !value.trim()}\n isLoading={sources.queue.isPending}\n onClick={async () => {\n if (\n (kind === 'text' && new TextEncoder().encode(value).length > 245760) ||\n (kind === 'website' && value.length > 2048)\n ) {\n setMessage('The source is too large. Split it into smaller sources.');\n return;\n }\n const fingerprint = JSON.stringify([kind, title, value]);\n if (pending.current?.fingerprint !== fingerprint)\n pending.current = { id: crypto.randomUUID(), fingerprint };\n try {\n await sources.queue.mutateAsync({\n clientRequestId: pending.current.id,\n title,\n ...(kind === 'website' ? { sourceUrl: value.trim() } : { content: value }),\n });\n pending.current = null;\n setValue('');\n setMessage('Source queued. Its progress will appear below.');\n } catch (error) {\n setMessage(\n graphqlErrorMessage(\n error,\n 'Admission could not be confirmed. Retry the same source to reuse its request ID. Check the source, embedding configuration and management permission.'\n )\n );\n }\n }}\n >\n Queue import\n </Button>\n {message && <p role=\"status\">{message}</p>}\n {sources.imports.isError ? (\n <p role=\"alert\">\n Imports could not be loaded. Knowledge management permission is required.\n </p>\n ) : sources.imports.isPending ? (\n <p role=\"status\">Loading imports…</p>\n ) : (\n sources.imports.data?.map((row) => {\n const status = knowledgeImportStatus(row);\n return (\n <div key={row.id} className=\"flex items-start justify-between gap-3 text-sm\">\n <div className=\"grid gap-1\">\n <span>\n {row.title} · <span className={TONE_CLASS[status.tone]}>{status.label}</span>\n </span>\n {status.detail && (\n <span\n role={\n status.tone === 'error' || status.tone === 'warning' ? 'alert' : undefined\n }\n className=\"text-text-secondary\"\n >\n {status.detail}\n </span>\n )}\n </div>\n {row.status === 'BLOCKED' && (\n <Button\n variant=\"outline\"\n isLoading={sources.retry.isPending}\n onClick={async () => {\n try {\n await sources.retry.mutateAsync(row.id);\n setMessage('Import recovery queued.');\n } catch (error) {\n setMessage(\n graphqlErrorMessage(\n error,\n 'Recovery failed. The embedding profile must still match the original import.'\n )\n );\n }\n }}\n >\n Retry import\n </Button>\n )}\n </div>\n );\n })\n )}\n <Button variant=\"outline\" onClick={() => void sources.imports.refetch()}>\n Refresh imports\n </Button>\n </section>\n );\n}\n"],"mappings":";;;;;;;;AAOA,IAAMA,IAAa;CACjB,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;AACT;AAEA,SAAgBC,EAA2B,EAAE,sBAAgD;CAC3F,IAAM,EAAE,gBAAa,mBAAgBC,EAAU;CAC/C,OACE,kBAACC,GAAD,EAEmB,mBAClB,GAFM,GAAGC,EAAY,GAAGC,GAAa,GAAG,GAAGC,GAE3C;AAEL;AACA,SAASH,EAAkB,EAAE,sBAAgD;CAC3E,IAAMI,IAAUC,EAA0BF,CAAe,GACnD,CAACG,GAAMC,KAAWC,EAAS,SAAS,GACxC,CAACC,GAAOC,KAAYF,EAAS,EAAE,GAC/B,CAACG,GAAOC,KAAYJ,EAAS,EAAE,GAC/B,CAACK,GAASC,KAAcN,EAAS,EAAE,GAC/BO,IAAUC,EAAmD,IAAI;CACvE,OACE,kBAAC,WAAD;EAAS,WAAU;EAAnB,UAAA;GACE,kBAAC,MAAD;IAAI,WAAU;IAAwB,UAAA;GAAoC,CAAA;GAC1E,kBAAC,KAAD;IAAG,WAAU;IAA8B,UAAA;GAGxC,CAAA;GACH,kBAAC,SAAD;IAAO,WAAU;IAAjB,UAAA,CAAsC,eAEpC,kBAAC,UAAD;KACE,WAAU;KACV,OAAOV;KACP,UAAUF,EAAQ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