@burdenoff/microfe-botmanor 2026.1124.1 → 2026.1127.2

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.
Files changed (126) hide show
  1. package/dist/botlit/BotmanorRootInner.js +45 -44
  2. package/dist/botlit/BotmanorRootInner.js.map +1 -1
  3. package/dist/botlit/components/AgentA2APanel.js +63 -62
  4. package/dist/botlit/components/AgentA2APanel.js.map +1 -1
  5. package/dist/botlit/components/AgentBindingsPanel.js +125 -124
  6. package/dist/botlit/components/AgentBindingsPanel.js.map +1 -1
  7. package/dist/botlit/components/AgentFallbackModelsPicker.js +56 -55
  8. package/dist/botlit/components/AgentFallbackModelsPicker.js.map +1 -1
  9. package/dist/botlit/components/AiOperationsPanel.js.map +1 -1
  10. package/dist/botlit/components/AssistantChannelPanel.js +40 -39
  11. package/dist/botlit/components/AssistantChannelPanel.js.map +1 -1
  12. package/dist/botlit/components/AssistantRuntimeSetupPanel.js +36 -35
  13. package/dist/botlit/components/AssistantRuntimeSetupPanel.js.map +1 -1
  14. package/dist/botlit/components/BotAgentsPanel.js +104 -103
  15. package/dist/botlit/components/BotAgentsPanel.js.map +1 -1
  16. package/dist/botlit/components/BotFormFields.js +118 -117
  17. package/dist/botlit/components/BotFormFields.js.map +1 -1
  18. package/dist/botlit/components/BucketDialogs.js +110 -110
  19. package/dist/botlit/components/BucketDialogs.js.map +1 -1
  20. package/dist/botlit/components/ChannelRoutesPanel.js +29 -28
  21. package/dist/botlit/components/ChannelRoutesPanel.js.map +1 -1
  22. package/dist/botlit/components/CreateChannelRouteDialog.js +105 -105
  23. package/dist/botlit/components/CreateChannelRouteDialog.js.map +1 -1
  24. package/dist/botlit/components/DescribeBotDialog.js +86 -86
  25. package/dist/botlit/components/DescribeBotDialog.js.map +1 -1
  26. package/dist/botlit/components/EmptyState.d.ts +8 -0
  27. package/dist/botlit/components/EmptyState.js +43 -30
  28. package/dist/botlit/components/EmptyState.js.map +1 -1
  29. package/dist/botlit/components/HandoffConfigPanel.js +125 -124
  30. package/dist/botlit/components/HandoffConfigPanel.js.map +1 -1
  31. package/dist/botlit/components/HandoffTargetPickers.js +42 -41
  32. package/dist/botlit/components/HandoffTargetPickers.js.map +1 -1
  33. package/dist/botlit/components/KnowledgeBackendMigrationPanel.js +106 -105
  34. package/dist/botlit/components/KnowledgeBackendMigrationPanel.js.map +1 -1
  35. package/dist/botlit/components/KnowledgeRetrievalTestPanel.js +76 -75
  36. package/dist/botlit/components/KnowledgeRetrievalTestPanel.js.map +1 -1
  37. package/dist/botlit/components/KnowledgeSourceImportPanel.js +76 -75
  38. package/dist/botlit/components/KnowledgeSourceImportPanel.js.map +1 -1
  39. package/dist/botlit/components/ModelRegistrationPanel.js +70 -69
  40. package/dist/botlit/components/ModelRegistrationPanel.js.map +1 -1
  41. package/dist/botlit/components/StorePackageDraftCard.js +87 -86
  42. package/dist/botlit/components/StorePackageDraftCard.js.map +1 -1
  43. package/dist/botlit/components/SuggestionsPanel.js.map +1 -1
  44. package/dist/botlit/hooks/internal/workspaceGateway.d.ts +12 -0
  45. package/dist/botlit/hooks/internal/workspaceGateway.js +1 -1
  46. package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -1
  47. package/dist/botlit/hooks/useA2A.js +2 -1
  48. package/dist/botlit/hooks/useA2A.js.map +1 -1
  49. package/dist/botlit/hooks/useA2AConnections.js +30 -38
  50. package/dist/botlit/hooks/useA2AConnections.js.map +1 -1
  51. package/dist/botlit/hooks/useKnowledgeBases.js +91 -48
  52. package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -1
  53. package/dist/botlit/pages/A2AAgentDetailPage.js +263 -262
  54. package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
  55. package/dist/botlit/pages/A2ARegistryPage.js +47 -46
  56. package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
  57. package/dist/botlit/pages/AgentBuilderPage.js +426 -425
  58. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
  59. package/dist/botlit/pages/AgentDetailPage.js +1 -0
  60. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  61. package/dist/botlit/pages/AgentsListPage.js +248 -247
  62. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  63. package/dist/botlit/pages/BotChannelsTab.js +324 -310
  64. package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
  65. package/dist/botlit/pages/BotDetailPage.js +1 -0
  66. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  67. package/dist/botlit/pages/BotWorkflowTab.js +126 -121
  68. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
  69. package/dist/botlit/pages/BotsListPage.js +1 -0
  70. package/dist/botlit/pages/BotsListPage.js.map +1 -1
  71. package/dist/botlit/pages/BucketDetailPage.js +1 -0
  72. package/dist/botlit/pages/BucketDetailPage.js.map +1 -1
  73. package/dist/botlit/pages/BucketsPage.js +1 -0
  74. package/dist/botlit/pages/BucketsPage.js.map +1 -1
  75. package/dist/botlit/pages/ChannelDetailPage.js +267 -266
  76. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
  77. package/dist/botlit/pages/ChannelsPage.js +187 -186
  78. package/dist/botlit/pages/ChannelsPage.js.map +1 -1
  79. package/dist/botlit/pages/ChatPage.js +69 -68
  80. package/dist/botlit/pages/ChatPage.js.map +1 -1
  81. package/dist/botlit/pages/ExecutionDetailPage.js +1 -0
  82. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
  83. package/dist/botlit/pages/ExecutionsPage.js +191 -191
  84. package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
  85. package/dist/botlit/pages/HandoffsPage.js +65 -64
  86. package/dist/botlit/pages/HandoffsPage.js.map +1 -1
  87. package/dist/botlit/pages/InstalledPackagesPage.js +146 -145
  88. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
  89. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +235 -234
  90. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
  91. package/dist/botlit/pages/KnowledgeBasesPage.js +152 -151
  92. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
  93. package/dist/botlit/pages/MCPServerDetailPage.js +180 -179
  94. package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -1
  95. package/dist/botlit/pages/MCPServersPage.js +145 -145
  96. package/dist/botlit/pages/MCPServersPage.js.map +1 -1
  97. package/dist/botlit/pages/PoliciesPage.js.map +1 -1
  98. package/dist/botlit/pages/PolicyDetailPage.js +293 -292
  99. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
  100. package/dist/botlit/pages/PromptStudioPage.js +229 -229
  101. package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
  102. package/dist/botlit/pages/PromptTemplateDetailPage.js +280 -279
  103. package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
  104. package/dist/botlit/pages/PromptTemplatesPage.js +31 -30
  105. package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
  106. package/dist/botlit/pages/RetrievalProfileDetailPage.js +204 -203
  107. package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -1
  108. package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
  109. package/dist/botlit/pages/SettingsPage.js +153 -153
  110. package/dist/botlit/pages/SettingsPage.js.map +1 -1
  111. package/dist/botlit/pages/SkillDetailPage.js +305 -304
  112. package/dist/botlit/pages/SkillDetailPage.js.map +1 -1
  113. package/dist/botlit/pages/SkillsPage.js.map +1 -1
  114. package/dist/botlit/pages/StorePackageDetailPage.js +1 -0
  115. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
  116. package/dist/botlit/pages/StorePage.js +173 -173
  117. package/dist/botlit/pages/StorePage.js.map +1 -1
  118. package/dist/botlit/utils/confirmAction.d.ts +13 -11
  119. package/dist/botlit/utils/confirmAction.js +26 -4
  120. package/dist/botlit/utils/confirmAction.js.map +1 -1
  121. package/dist/generated/wspace-operations.d.ts +106 -42
  122. package/dist/generated/wspace-operations.js +198 -172
  123. package/dist/generated/wspace-operations.js.map +1 -1
  124. package/dist/generated/wspace-types.d.ts +9859 -49
  125. package/dist/generated/wspace-types.js.map +1 -1
  126. package/package.json +3 -3
@@ -1,15 +1,15 @@
1
1
  import { useTr as e } from "../../shared/hooks/useTr.js";
2
2
  import { useBotlit as t } from "../providers/BotlitProvider.js";
3
3
  import { KnowledgeBackendMigrationPanel as n } from "../components/KnowledgeBackendMigrationPanel.js";
4
- import { KnowledgeDocumentUploadPanel as ee } from "../components/KnowledgeDocumentUploadPanel.js";
5
- import { KnowledgeRetrievalTestPanel as te } from "../components/KnowledgeRetrievalTestPanel.js";
6
- import { BOTMANOR_PERMISSIONS as r } from "../permissions/botmanorPermissions.js";
7
- import { BotmanorPermissionGate as i, useBotmanorCan as ne } from "../permissions/useBotmanorPermissions.js";
8
- import { KnowledgeSourceImportPanel as re } from "../components/KnowledgeSourceImportPanel.js";
9
- import { KnowledgeSearchPanel as ie } from "../components/KnowledgeSearchPanel.js";
10
- import { PageLayout as a } from "../components/PageLayout.js";
11
- import { EmptyState as ae } from "../components/EmptyState.js";
12
- import { ErrorState as o } from "../components/ErrorState.js";
4
+ import { KnowledgeDocumentUploadPanel as r } from "../components/KnowledgeDocumentUploadPanel.js";
5
+ import { KnowledgeRetrievalTestPanel as ee } from "../components/KnowledgeRetrievalTestPanel.js";
6
+ import { BOTMANOR_PERMISSIONS as i } from "../permissions/botmanorPermissions.js";
7
+ import { BotmanorPermissionGate as a, useBotmanorCan as te } from "../permissions/useBotmanorPermissions.js";
8
+ import { KnowledgeSourceImportPanel as ne } from "../components/KnowledgeSourceImportPanel.js";
9
+ import { KnowledgeSearchPanel as re } from "../components/KnowledgeSearchPanel.js";
10
+ import { PageLayout as o } from "../components/PageLayout.js";
11
+ import { EmptyState as ie } from "../components/EmptyState.js";
12
+ import { ErrorState as ae } from "../components/ErrorState.js";
13
13
  import { Card as s, CardContent as c, CardDescription as l, CardHeader as u, CardTitle as d } from "../components/Card.js";
14
14
  import { KnowledgeReviewSchedule as oe } from "../components/KnowledgeReviewSchedule.js";
15
15
  import { Button as f } from "../components/Button.js";
@@ -25,17 +25,17 @@ import { knowledgeBaseDeleteMessage as xe } from "../utils/kbDelete.js";
25
25
  import { KB_CHUNK_SIZE_RANGE as _, KB_FIELD_MESSAGES as Se, indexStatusHelp as Ce, isDocumentBusy as we, isIndexBusy as Te, parseKbNumber as v, validateKbForm as Ee } from "../utils/kbSettings.js";
26
26
  import "../permissions/index.js";
27
27
  import { useEffect as De, useRef as Oe, useState as y } from "react";
28
- import { GlassCard as ke, PagePurpose as Ae } from "@burdenoff/fe-libs/ui";
29
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
30
- import { useParams as je } from "react-router";
31
- import { AlertTriangle as C, ArrowLeft as w, Boxes as Me, Database as T, FileText as Ne, Layers as Pe, RefreshCw as Fe, Save as E, Settings as D, Trash2 as Ie } from "lucide-react";
32
- import { toast as O } from "sonner";
28
+ import { GlassCard as ke, PagePurpose as Ae, ThemedSelect as b } from "@burdenoff/fe-libs/ui";
29
+ import { Fragment as je, jsx as x, jsxs as S } from "react/jsx-runtime";
30
+ import { useParams as Me } from "react-router";
31
+ import { AlertTriangle as Ne, ArrowLeft as Pe, Boxes as Fe, Database as Ie, FileText as Le, Layers as Re, RefreshCw as ze, Save as Be, Settings as Ve, Trash2 as He } from "lucide-react";
32
+ import { toast as C } from "sonner";
33
33
  // src/botlit/pages/KnowledgeBaseDetailPage.tsx
34
- var Le = 5e3, Re = [
34
+ var Ue = 5e3, We = [
35
35
  "RECURSIVE",
36
36
  "FIXED",
37
37
  "SENTENCE"
38
- ], ze = {
38
+ ], Ge = {
39
39
  RECURSIVE: {
40
40
  key: "recursive",
41
41
  fallback: "Splits on paragraphs, then sentences, then words, keeping related text together. The best default."
@@ -48,12 +48,12 @@ var Le = 5e3, Re = [
48
48
  key: "sentence",
49
49
  fallback: "Packs whole sentences into each chunk, never cutting one in half."
50
50
  }
51
- }, Be = "kb-add-content", Ve = "rounded-md border border-border-default bg-surface-primary px-2 py-1 text-sm text-text-primary";
52
- function He(e) {
51
+ }, w = "kb-add-content", Ke = "rounded-md border border-border-default bg-surface-primary px-2 py-1 text-sm text-text-primary";
52
+ function qe(e) {
53
53
  let t = e.replace(/_/g, " ").toLowerCase();
54
54
  return t.charAt(0).toUpperCase() + t.slice(1);
55
55
  }
56
- var Ue = {
56
+ var T = {
57
57
  name: "",
58
58
  description: "",
59
59
  embeddingModel: "",
@@ -62,7 +62,7 @@ var Ue = {
62
62
  chunkSize: "512",
63
63
  chunkOverlap: "50"
64
64
  };
65
- function We(e) {
65
+ function E(e) {
66
66
  return {
67
67
  name: e.name,
68
68
  description: e.description ?? "",
@@ -73,120 +73,120 @@ function We(e) {
73
73
  chunkOverlap: String(e.chunkOverlap)
74
74
  };
75
75
  }
76
- var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", k = ({ isNew: k }) => {
77
- let A = e(), qe = ne(), { kbId: j, botId: Je } = je(), M = Je ? `bots/${Je}/knowledge` : "knowledge", { navigateTo: N } = t(), P = le(), F = ue(), I = P.loading || F.loading, L = P.error || F.error, R = ye(P.data ?? [], F.data ?? []), { data: z, loading: Ye, error: Xe, refetch: B } = pe(k ? void 0 : j), V = me(k ? void 0 : j), H = V.data, [Ze, Qe] = de(), [$e, et] = ve(), [tt, nt] = ge(), [rt, it] = fe(), [at] = _e(), ot = he(), [st, U] = y(!1), [W, G] = y(Ue), [ct, K] = y(!1), [lt, ut] = y(null), [q, dt] = y(""), [ft, pt] = y(!1), mt = !!k && !ft && JSON.stringify(W) !== JSON.stringify(Ue), ht = Oe(null);
76
+ var D = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", O = ({ isNew: O }) => {
77
+ let A = e(), j = te(), { kbId: M, botId: Je } = Me(), N = Je ? `bots/${Je}/knowledge` : "knowledge", { navigateTo: P } = t(), F = le(), I = ue(), L = F.loading || I.loading, R = F.error || I.error, z = ye(F.data ?? [], I.data ?? []), { data: B, loading: Ye, error: Xe, refetch: V } = pe(O ? void 0 : M), H = me(O ? void 0 : M), U = H.data, [Ze, Qe] = de(), [$e, et] = ve(), [tt, nt] = ge(), [rt, it] = fe(), [at] = _e(), ot = he(), [st, W] = y(!1), [G, K] = y(T), [ct, q] = y(!1), [lt, ut] = y(null), [J, dt] = y(""), [ft, pt] = y(!1), mt = !!O && !ft && JSON.stringify(G) !== JSON.stringify(T), ht = Oe(null);
78
78
  De(() => {
79
- z && !k && ht.current !== z.id && (ht.current = z.id, G(We(z)));
80
- }, [z, k]);
81
- let J = Te(z?.indexStatus) || H.some((e) => we(e.status));
79
+ B && !O && ht.current !== B.id && (ht.current = B.id, K(E(B)));
80
+ }, [B, O]);
81
+ let Y = Te(B?.indexStatus) || U.some((e) => we(e.status));
82
82
  De(() => {
83
- if (k || !J) return;
83
+ if (O || !Y) return;
84
84
  let e = window.setInterval(() => {
85
- B(), V.refetch();
86
- }, Le);
85
+ V(), H.refetch();
86
+ }, Ue);
87
87
  return () => window.clearInterval(e);
88
88
  }, [
89
- k,
90
- J,
91
- B,
92
- V
89
+ O,
90
+ Y,
91
+ V,
92
+ H
93
93
  ]);
94
- let Y = /* @__PURE__ */ new Map();
95
- for (let e of H) Y.set(e.status, (Y.get(e.status) ?? 0) + 1);
96
- let gt = [...Y.entries()].sort(([e], [t]) => e.localeCompare(t)), _t = Y.has(q) ? q : "", vt = _t ? H.filter((e) => e.status === _t) : H, X = Ee({
97
- name: W.name,
98
- embeddingModel: W.embeddingModel,
99
- chunkSize: W.chunkSize,
100
- chunkOverlap: W.chunkOverlap
101
- }, k ? "create" : "edit"), Z = (e) => {
102
- let t = ct ? X[e] : void 0;
94
+ let X = /* @__PURE__ */ new Map();
95
+ for (let e of U) X.set(e.status, (X.get(e.status) ?? 0) + 1);
96
+ let gt = [...X.entries()].sort(([e], [t]) => e.localeCompare(t)), _t = X.has(J) ? J : "", vt = _t ? U.filter((e) => e.status === _t) : U, Z = Ee({
97
+ name: G.name,
98
+ embeddingModel: G.embeddingModel,
99
+ chunkSize: G.chunkSize,
100
+ chunkOverlap: G.chunkOverlap
101
+ }, O ? "create" : "edit"), Q = (e) => {
102
+ let t = ct ? Z[e] : void 0;
103
103
  return t ? A(`botlit.kb.errors.${t}`, Se[t]) : void 0;
104
104
  };
105
- be(mt, A), q && !V.loading && !Y.has(q) && dt("");
105
+ be(mt, A), J && !H.loading && !X.has(J) && dt("");
106
106
  let yt = async () => {
107
107
  (!mt || await h({
108
108
  title: A("botlit.kb.discard.title", "Discard this knowledge base?"),
109
109
  message: A("botlit.kb.discard.message", "You have unsaved changes. If you leave now they will be lost."),
110
110
  confirmLabel: A("botlit.kb.discard.confirm", "Discard"),
111
111
  cancelLabel: A("botlit.kb.discard.keepEditing", "Keep editing")
112
- })) && (pt(!0), N(M));
112
+ })) && (pt(!0), P(N));
113
113
  }, bt = async (e) => {
114
114
  if (e.preventDefault(), !Qe.loading) {
115
- if (I) O.error(A("botlit.kb.catalogLoading", "The model list is still loading. Try again in a moment."));
116
- else if (Object.keys(X).length > 0) K(!0);
117
- else if (!R.some((e) => e.id === W.embeddingModel)) K(!0), O.error(A("botlit.kb.modelUnavailable", "Choose a configured embedding model. Register one in Settings first."));
115
+ if (L) C.error(A("botlit.kb.catalogLoading", "The model list is still loading. Try again in a moment."));
116
+ else if (Object.keys(Z).length > 0) q(!0);
117
+ else if (!z.some((e) => e.id === G.embeddingModel)) q(!0), C.error(A("botlit.kb.modelUnavailable", "Choose a configured embedding model. Register one in Settings first."));
118
118
  else try {
119
119
  let e = await Ze({
120
- name: W.name.trim(),
121
- description: W.description.trim() || null,
122
- embeddingModel: W.embeddingModel,
123
- embeddingDimensions: W.embeddingDimensions,
124
- chunkingStrategy: W.chunkingStrategy,
125
- chunkSize: v(W.chunkSize),
126
- chunkOverlap: v(W.chunkOverlap)
120
+ name: G.name.trim(),
121
+ description: G.description.trim() || null,
122
+ embeddingModel: G.embeddingModel,
123
+ embeddingDimensions: G.embeddingDimensions,
124
+ chunkingStrategy: G.chunkingStrategy,
125
+ chunkSize: v(G.chunkSize),
126
+ chunkOverlap: v(G.chunkOverlap)
127
127
  });
128
- O.success(A("botlit.kb.created", "Knowledge base \"{{name}}\" created", { name: e.name })), pt(!0), N(`knowledge/${e.id}`);
128
+ C.success(A("botlit.kb.created", "Knowledge base \"{{name}}\" created", { name: e.name })), pt(!0), P(`knowledge/${e.id}`);
129
129
  } catch (e) {
130
- O.error(e instanceof Error ? e.message : A("botlit.kb.createFailed", "Failed to create knowledge base"));
130
+ C.error(e instanceof Error ? e.message : A("botlit.kb.createFailed", "Failed to create knowledge base"));
131
131
  }
132
132
  }
133
133
  }, xt = async (e) => {
134
- if (e.preventDefault(), !j || !z || et.loading) return;
135
- if (Object.keys(X).length > 0) {
136
- K(!0);
134
+ if (e.preventDefault(), !M || !B || et.loading) return;
135
+ if (Object.keys(Z).length > 0) {
136
+ q(!0);
137
137
  return;
138
138
  }
139
- let t = v(W.chunkSize), n = v(W.chunkOverlap), ee = t !== z.chunkSize || n !== z.chunkOverlap || W.chunkingStrategy !== z.chunkingStrategy;
139
+ let t = v(G.chunkSize), n = v(G.chunkOverlap), r = t !== B.chunkSize || n !== B.chunkOverlap || G.chunkingStrategy !== B.chunkingStrategy;
140
140
  try {
141
141
  await $e({
142
- kbId: j,
142
+ kbId: M,
143
143
  input: {
144
- name: W.name.trim(),
145
- description: W.description.trim() || null,
146
- chunkingStrategy: W.chunkingStrategy,
144
+ name: G.name.trim(),
145
+ description: G.description.trim() || null,
146
+ chunkingStrategy: G.chunkingStrategy,
147
147
  chunkSize: t,
148
148
  chunkOverlap: n
149
149
  }
150
- }), await B(), O.success(A("botlit.kb.updated", "Knowledge base updated")), U(!1), K(!1), ee && z.totalDocuments > 0 && await h({
150
+ }), await V(), C.success(A("botlit.kb.updated", "Knowledge base updated")), W(!1), q(!1), r && B.totalDocuments > 0 && await h({
151
151
  title: A("botlit.kb.rebuildPrompt.title", "Rebuild the index?"),
152
- message: A("botlit.kb.rebuildPrompt.message", "The chunk settings changed. Your {{count}} existing document(s) keep their old chunks until the index is rebuilt. Rebuild now?", { count: z.totalDocuments }),
152
+ message: A("botlit.kb.rebuildPrompt.message", "The chunk settings changed. Your {{count}} existing document(s) keep their old chunks until the index is rebuilt. Rebuild now?", { count: B.totalDocuments }),
153
153
  confirmLabel: A("botlit.kb.rebuild", "Rebuild Index"),
154
154
  cancelLabel: A("botlit.kb.rebuildPrompt.later", "Later")
155
155
  }) && await St();
156
156
  } catch (e) {
157
- O.error(e instanceof Error ? e.message : A("botlit.kb.updateFailed", "Failed to update knowledge base"));
157
+ C.error(e instanceof Error ? e.message : A("botlit.kb.updateFailed", "Failed to update knowledge base"));
158
158
  }
159
159
  }, St = async () => {
160
- if (j) {
160
+ if (M) {
161
161
  ut(null);
162
162
  try {
163
- if (!await tt(j)) {
164
- O.error(A("botlit.kb.rebuildNotDone", "The index could not be rebuilt."));
163
+ if (!await tt(M)) {
164
+ C.error(A("botlit.kb.rebuildNotDone", "The index could not be rebuilt."));
165
165
  return;
166
166
  }
167
- O.success(A("botlit.kb.rebuilt", "Index rebuilt"));
167
+ C.success(A("botlit.kb.rebuilt", "Index rebuilt"));
168
168
  } catch (e) {
169
- ut(A("botlit.kb.rebuildMaybeRunning", "The rebuild did not report back. A large library can still be rebuilding in the background: this page keeps refreshing, so check the index status.")), O.error(e instanceof Error ? e.message : A("botlit.kb.rebuildFailed", "Failed to rebuild the index"));
169
+ ut(A("botlit.kb.rebuildMaybeRunning", "The rebuild did not report back. A large library can still be rebuilding in the background: this page keeps refreshing, so check the index status.")), C.error(e instanceof Error ? e.message : A("botlit.kb.rebuildFailed", "Failed to rebuild the index"));
170
170
  } finally {
171
- await B(), await V.refetch();
171
+ await V(), await H.refetch();
172
172
  }
173
173
  }
174
174
  }, Ct = async () => {
175
- if (!j || !z) return;
176
- let e = await ot(j).catch(() => null);
175
+ if (!M || !B) return;
176
+ let e = await ot(M).catch(() => null);
177
177
  if (await h({
178
178
  title: A("botlit.kb.delete.title", "Delete knowledge base?"),
179
- message: xe(A, z.name, e),
179
+ message: xe(A, B.name, e),
180
180
  confirmLabel: A("botlit.common.delete", "Delete"),
181
181
  cancelLabel: A("botlit.common.cancel", "Cancel")
182
182
  })) try {
183
- if (!await rt(j)) {
184
- O.error(A("botlit.kb.delete.notDeleted", "The knowledge base could not be deleted."));
183
+ if (!await rt(M)) {
184
+ C.error(A("botlit.kb.delete.notDeleted", "The knowledge base could not be deleted."));
185
185
  return;
186
186
  }
187
- O.success(A("botlit.kb.delete.success", "Knowledge base \"{{name}}\" deleted", { name: z.name })), N(M);
187
+ C.success(A("botlit.kb.delete.success", "Knowledge base \"{{name}}\" deleted", { name: B.name })), P(N);
188
188
  } catch (e) {
189
- O.error(e instanceof Error ? e.message : A("botlit.kb.delete.error", "Failed to delete the knowledge base"));
189
+ C.error(e instanceof Error ? e.message : A("botlit.kb.delete.error", "Failed to delete the knowledge base"));
190
190
  }
191
191
  }, wt = async (e) => {
192
192
  if (await h({
@@ -196,41 +196,41 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
196
196
  cancelLabel: A("botlit.common.cancel", "Cancel")
197
197
  })) try {
198
198
  if (!await at(e.id)) {
199
- O.error(A("botlit.kb.document.notRemoved", "The document could not be removed."));
199
+ C.error(A("botlit.kb.document.notRemoved", "The document could not be removed."));
200
200
  return;
201
201
  }
202
- O.success(A("botlit.kb.document.removed", "Document \"{{title}}\" removed", { title: e.title })), await V.refetch(), await B();
202
+ C.success(A("botlit.kb.document.removed", "Document \"{{title}}\" removed", { title: e.title })), await H.refetch(), await V();
203
203
  } catch (e) {
204
- O.error(e instanceof Error ? e.message : A("botlit.kb.document.removeFailed", "Failed to remove the document"));
204
+ C.error(e instanceof Error ? e.message : A("botlit.kb.document.removeFailed", "Failed to remove the document"));
205
205
  }
206
- }, Q = (e) => `kb-form-${e}`, Tt = (e) => /* @__PURE__ */ S(b, { children: [
206
+ }, $ = (e) => `kb-form-${e}`, Tt = (e) => /* @__PURE__ */ S(je, { children: [
207
207
  /* @__PURE__ */ x(p, {
208
208
  label: A("botlit.kb.form.name", "Name"),
209
209
  required: !0,
210
- htmlFor: Q("name"),
211
- error: Z("name"),
210
+ htmlFor: $("name"),
211
+ error: Q("name"),
212
212
  children: /* @__PURE__ */ x(m, {
213
- id: Q("name"),
213
+ id: $("name"),
214
214
  required: !0,
215
- "aria-invalid": Z("name") ? !0 : void 0,
216
- "aria-describedby": Z("name") ? `${Q("name")}-error` : void 0,
215
+ "aria-invalid": Q("name") ? !0 : void 0,
216
+ "aria-describedby": Q("name") ? `${$("name")}-error` : void 0,
217
217
  placeholder: A("botlit.kb.form.namePlaceholder", "e.g., Product Documentation"),
218
- value: W.name,
219
- onChange: (e) => G({
220
- ...W,
218
+ value: G.name,
219
+ onChange: (e) => K({
220
+ ...G,
221
221
  name: e.target.value
222
222
  })
223
223
  })
224
224
  }),
225
225
  /* @__PURE__ */ x(p, {
226
226
  label: A("botlit.kb.form.description", "Description"),
227
- htmlFor: Q("description"),
227
+ htmlFor: $("description"),
228
228
  children: /* @__PURE__ */ x(se, {
229
- id: Q("description"),
229
+ id: $("description"),
230
230
  placeholder: A("botlit.kb.form.descriptionPlaceholder", "What kind of knowledge will this store?"),
231
- value: W.description,
232
- onChange: (e) => G({
233
- ...W,
231
+ value: G.description,
232
+ onChange: (e) => K({
233
+ ...G,
234
234
  description: e.target.value
235
235
  }),
236
236
  rows: 3
@@ -239,30 +239,30 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
239
239
  e && /* @__PURE__ */ S(p, {
240
240
  label: A("botlit.kb.form.embeddingModel", "Embedding Model"),
241
241
  required: !0,
242
- htmlFor: Q("model"),
243
- error: Z("embeddingModel"),
242
+ htmlFor: $("model"),
243
+ error: Q("embeddingModel"),
244
244
  children: [
245
- /* @__PURE__ */ S("select", {
246
- id: Q("model"),
247
- className: Ge,
245
+ /* @__PURE__ */ S(b, {
246
+ id: $("model"),
247
+ className: D,
248
248
  "aria-label": A("botlit.kb.form.embeddingModel", "Embedding Model"),
249
249
  required: !0,
250
- "aria-invalid": Z("embeddingModel") ? !0 : void 0,
251
- "aria-describedby": Z("embeddingModel") ? `${Q("model")}-error` : void 0,
252
- disabled: I || !!L,
253
- value: W.embeddingModel,
250
+ "aria-invalid": Q("embeddingModel") ? !0 : void 0,
251
+ "aria-describedby": Q("embeddingModel") ? `${$("model")}-error` : void 0,
252
+ disabled: L || !!R,
253
+ value: G.embeddingModel,
254
254
  onChange: (e) => {
255
- let t = R.find((t) => t.id === e.target.value);
256
- G({
257
- ...W,
255
+ let t = z.find((t) => t.id === e.target.value);
256
+ K({
257
+ ...G,
258
258
  embeddingModel: e.target.value,
259
- embeddingDimensions: t?.dimensions ?? W.embeddingDimensions
259
+ embeddingDimensions: t?.dimensions ?? G.embeddingDimensions
260
260
  });
261
261
  },
262
262
  children: [/* @__PURE__ */ x("option", {
263
263
  value: "",
264
264
  children: A("botlit.kb.form.chooseModel", "Choose a configured embedding model")
265
- }), R.map((e) => /* @__PURE__ */ S("option", {
265
+ }), z.map((e) => /* @__PURE__ */ S("option", {
266
266
  value: e.id,
267
267
  children: [
268
268
  e.label,
@@ -272,28 +272,28 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
272
272
  ]
273
273
  }, e.id))]
274
274
  }),
275
- I && /* @__PURE__ */ x("p", {
275
+ L && /* @__PURE__ */ x("p", {
276
276
  role: "status",
277
277
  children: A("botlit.kb.form.loadingModels", "Loading configured embedding models…")
278
278
  }),
279
- L && /* @__PURE__ */ S("div", {
279
+ R && /* @__PURE__ */ S("div", {
280
280
  role: "alert",
281
281
  children: [/* @__PURE__ */ x("p", { children: A("botlit.kb.form.modelsFailed", "Could not load configured models. Try loading the catalog again.") }), /* @__PURE__ */ x(f, {
282
282
  type: "button",
283
283
  variant: "secondary",
284
284
  onClick: () => {
285
- P.refetch(), F.refetch();
285
+ F.refetch(), I.refetch();
286
286
  },
287
287
  children: A("botlit.kb.form.retryModels", "Retry model catalog")
288
288
  })]
289
289
  }),
290
- !I && !L && R.length === 0 && /* @__PURE__ */ S("div", {
290
+ !L && !R && z.length === 0 && /* @__PURE__ */ S("div", {
291
291
  className: "text-sm text-text-secondary",
292
292
  children: [/* @__PURE__ */ x("p", { children: A("botlit.kb.form.noModels", "No embedding model is registered yet. Register one with an active provider in Settings first.") }), /* @__PURE__ */ x(f, {
293
293
  type: "button",
294
294
  variant: "ghost",
295
295
  className: "px-0",
296
- onClick: () => N("settings"),
296
+ onClick: () => P("settings"),
297
297
  children: A("botlit.kb.form.openSettings", "Open Settings")
298
298
  })]
299
299
  })
@@ -304,18 +304,18 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
304
304
  children: [
305
305
  /* @__PURE__ */ x(p, {
306
306
  label: A("botlit.kb.form.strategy", "Chunking Strategy"),
307
- htmlFor: Q("strategy"),
308
- description: A(`botlit.kb.strategyHelp.${ze[Ke(W.chunkingStrategy)].key}`, ze[Ke(W.chunkingStrategy)].fallback),
309
- children: /* @__PURE__ */ x("select", {
310
- id: Q("strategy"),
311
- className: Ge,
312
- "aria-describedby": `${Q("strategy")}-description`,
313
- value: W.chunkingStrategy,
314
- onChange: (e) => G({
315
- ...W,
307
+ htmlFor: $("strategy"),
308
+ description: A(`botlit.kb.strategyHelp.${Ge[k(G.chunkingStrategy)].key}`, Ge[k(G.chunkingStrategy)].fallback),
309
+ children: /* @__PURE__ */ x(b, {
310
+ id: $("strategy"),
311
+ className: D,
312
+ "aria-describedby": `${$("strategy")}-description`,
313
+ value: G.chunkingStrategy,
314
+ onChange: (e) => K({
315
+ ...G,
316
316
  chunkingStrategy: e.target.value
317
317
  }),
318
- children: Re.map((e) => /* @__PURE__ */ x("option", {
318
+ children: We.map((e) => /* @__PURE__ */ x("option", {
319
319
  value: e,
320
320
  children: e
321
321
  }, e))
@@ -323,59 +323,59 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
323
323
  }),
324
324
  /* @__PURE__ */ x(p, {
325
325
  label: A("botlit.kb.form.chunkSize", "Chunk Size"),
326
- htmlFor: Q("chunk-size"),
327
- error: Z("chunkSize"),
326
+ htmlFor: $("chunk-size"),
327
+ error: Q("chunkSize"),
328
328
  description: A("botlit.kb.form.chunkSizeHelp", "In approximate tokens, {{min}} to {{max}}. Empty uses {{default}} when creating.", {
329
329
  min: _.min,
330
330
  max: _.max,
331
331
  default: 512
332
332
  }),
333
333
  children: /* @__PURE__ */ x(m, {
334
- id: Q("chunk-size"),
334
+ id: $("chunk-size"),
335
335
  type: "number",
336
336
  min: _.min,
337
337
  max: _.max,
338
338
  step: 1,
339
- "aria-invalid": Z("chunkSize") ? !0 : void 0,
340
- "aria-describedby": Z("chunkSize") ? `${Q("chunk-size")}-error` : `${Q("chunk-size")}-description`,
341
- value: W.chunkSize,
342
- onChange: (e) => G({
343
- ...W,
339
+ "aria-invalid": Q("chunkSize") ? !0 : void 0,
340
+ "aria-describedby": Q("chunkSize") ? `${$("chunk-size")}-error` : `${$("chunk-size")}-description`,
341
+ value: G.chunkSize,
342
+ onChange: (e) => K({
343
+ ...G,
344
344
  chunkSize: e.target.value
345
345
  })
346
346
  })
347
347
  }),
348
348
  /* @__PURE__ */ x(p, {
349
349
  label: A("botlit.kb.form.chunkOverlap", "Chunk Overlap"),
350
- htmlFor: Q("chunk-overlap"),
351
- error: Z("chunkOverlap"),
350
+ htmlFor: $("chunk-overlap"),
351
+ error: Q("chunkOverlap"),
352
352
  description: A("botlit.kb.form.chunkOverlapHelp", "Tokens shared between neighbouring chunks. 0 or more, and below the chunk size."),
353
353
  children: /* @__PURE__ */ x(m, {
354
- id: Q("chunk-overlap"),
354
+ id: $("chunk-overlap"),
355
355
  type: "number",
356
356
  min: 0,
357
357
  step: 1,
358
- "aria-invalid": Z("chunkOverlap") ? !0 : void 0,
359
- "aria-describedby": Z("chunkOverlap") ? `${Q("chunk-overlap")}-error` : `${Q("chunk-overlap")}-description`,
360
- value: W.chunkOverlap,
361
- onChange: (e) => G({
362
- ...W,
358
+ "aria-invalid": Q("chunkOverlap") ? !0 : void 0,
359
+ "aria-describedby": Q("chunkOverlap") ? `${$("chunk-overlap")}-error` : `${$("chunk-overlap")}-description`,
360
+ value: G.chunkOverlap,
361
+ onChange: (e) => K({
362
+ ...G,
363
363
  chunkOverlap: e.target.value
364
364
  })
365
365
  })
366
366
  })
367
367
  ]
368
368
  })
369
- ] }), $ = ct && Object.keys(X).length > 0 ? /* @__PURE__ */ S("div", {
369
+ ] }), Et = ct && Object.keys(Z).length > 0 ? /* @__PURE__ */ S("div", {
370
370
  role: "alert",
371
371
  className: "flex items-start gap-2 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-text-primary",
372
- children: [/* @__PURE__ */ x(C, {
372
+ children: [/* @__PURE__ */ x(Ne, {
373
373
  size: 16,
374
374
  className: "mt-0.5 text-status-error-text",
375
375
  "aria-hidden": "true"
376
376
  }), /* @__PURE__ */ x("p", { children: A("botlit.kb.errors.summary", "Fix the highlighted fields before saving.") })]
377
377
  }) : null;
378
- if (k) return /* @__PURE__ */ x(a, {
378
+ if (O) return /* @__PURE__ */ x(o, {
379
379
  title: A("botlit.kb.createTitle", "Create Knowledge Base"),
380
380
  description: A("botlit.kb.createDescription", "Set up an embedding index your agents can retrieve from"),
381
381
  leading: /* @__PURE__ */ x(f, {
@@ -383,7 +383,7 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
383
383
  size: "icon",
384
384
  "aria-label": A("botlit.kb.back", "Back to knowledge bases"),
385
385
  onClick: () => void yt(),
386
- children: /* @__PURE__ */ x(w, {
386
+ children: /* @__PURE__ */ x(Pe, {
387
387
  size: 20,
388
388
  "aria-hidden": "true"
389
389
  })
@@ -397,7 +397,7 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
397
397
  }), /* @__PURE__ */ x(f, {
398
398
  type: "submit",
399
399
  form: "kb-create-form",
400
- leftIcon: /* @__PURE__ */ x(E, { size: 16 }),
400
+ leftIcon: /* @__PURE__ */ x(Be, { size: 16 }),
401
401
  isLoading: Qe.loading,
402
402
  children: A("botlit.kb.create", "Create")
403
403
  })]
@@ -407,13 +407,13 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
407
407
  noValidate: !0,
408
408
  onSubmit: (e) => void bt(e),
409
409
  className: "max-w-3xl space-y-6",
410
- children: [$, /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ S(u, { children: [/* @__PURE__ */ x(d, { children: A("botlit.kb.indexConfig", "Index Configuration") }), /* @__PURE__ */ x(l, { children: A("botlit.kb.indexConfigCreateHelp", "The embedding model and its vector width are fixed once documents are indexed.") })] }), /* @__PURE__ */ x(c, {
410
+ children: [Et, /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ S(u, { children: [/* @__PURE__ */ x(d, { children: A("botlit.kb.indexConfig", "Index Configuration") }), /* @__PURE__ */ x(l, { children: A("botlit.kb.indexConfigCreateHelp", "The embedding model and its vector width are fixed once documents are indexed.") })] }), /* @__PURE__ */ x(c, {
411
411
  className: "space-y-4",
412
412
  children: Tt(!0)
413
413
  })] })]
414
414
  })
415
415
  });
416
- if (Ye) return /* @__PURE__ */ x(a, {
416
+ if (Ye) return /* @__PURE__ */ x(o, {
417
417
  title: A("botlit.common.loading", "Loading..."),
418
418
  children: /* @__PURE__ */ x("div", {
419
419
  role: "status",
@@ -422,77 +422,78 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
422
422
  className: "h-96 rounded-lg bg-bg-sunken motion-safe:animate-vc-shimmer"
423
423
  })
424
424
  });
425
- if (Xe) return /* @__PURE__ */ x(a, {
425
+ if (Xe) return /* @__PURE__ */ x(o, {
426
426
  title: A("botlit.kb.errorTitle", "Knowledge Base"),
427
- children: /* @__PURE__ */ x(o, {
427
+ children: /* @__PURE__ */ x(ae, {
428
428
  resource: A("botlit.kb.thisResource", "this knowledge base"),
429
429
  error: Xe,
430
- onRetry: () => void B()
430
+ onRetry: () => void V()
431
431
  })
432
432
  });
433
- if (!z) return /* @__PURE__ */ x(a, {
433
+ if (!B) return /* @__PURE__ */ x(o, {
434
434
  title: A("botlit.kb.notFound.title", "Knowledge Base Not Found"),
435
- children: /* @__PURE__ */ x(ae, {
435
+ children: /* @__PURE__ */ x(ie, {
436
+ kind: "not-found",
436
437
  illustration: "empty-files",
437
438
  title: A("botlit.kb.notFound.title", "Knowledge Base Not Found"),
438
439
  description: A("botlit.kb.notFound.description", "This knowledge base doesn't exist."),
439
440
  action: /* @__PURE__ */ x(f, {
440
- onClick: () => N(M),
441
+ onClick: () => P(N),
441
442
  children: A("botlit.kb.notFound.back", "Back to Knowledge Bases")
442
443
  })
443
444
  })
444
445
  });
445
- let Et = Ce(z.indexStatus), Dt = !I && !L && !R.some((e) => e.id === z.embeddingModel);
446
- return /* @__PURE__ */ x(a, {
447
- title: z.name,
446
+ let Dt = Ce(B.indexStatus), Ot = !L && !R && !z.some((e) => e.id === B.embeddingModel);
447
+ return /* @__PURE__ */ x(o, {
448
+ title: B.name,
448
449
  leading: /* @__PURE__ */ x(f, {
449
450
  variant: "ghost",
450
451
  size: "icon",
451
452
  "aria-label": A("botlit.kb.back", "Back to knowledge bases"),
452
- onClick: () => N(M),
453
- children: /* @__PURE__ */ x(w, {
453
+ onClick: () => P(N),
454
+ children: /* @__PURE__ */ x(Pe, {
454
455
  size: 20,
455
456
  "aria-hidden": "true"
456
457
  })
457
458
  }),
458
- meta: /* @__PURE__ */ x(ce, { status: z.indexStatus }),
459
- description: z.description,
459
+ meta: /* @__PURE__ */ x(ce, { status: B.indexStatus }),
460
+ description: B.description,
460
461
  actions: /* @__PURE__ */ S("div", {
461
462
  className: "flex gap-2",
462
463
  children: [
463
- /* @__PURE__ */ x(i, {
464
- permission: r.KNOWLEDGE_MANAGE,
464
+ /* @__PURE__ */ x(a, {
465
+ permission: i.KNOWLEDGE_MANAGE,
465
466
  children: /* @__PURE__ */ x(f, {
466
467
  variant: "outline",
467
- leftIcon: /* @__PURE__ */ x(Fe, { size: 16 }),
468
+ leftIcon: /* @__PURE__ */ x(ze, { size: 16 }),
468
469
  onClick: () => void St(),
469
470
  isLoading: nt.loading,
470
471
  children: A("botlit.kb.rebuild", "Rebuild Index")
471
472
  })
472
473
  }),
473
- st ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(f, {
474
+ st ? /* @__PURE__ */ S(je, { children: [/* @__PURE__ */ x(f, {
474
475
  variant: "outline",
475
476
  onClick: () => {
476
- G(We(z)), U(!1), K(!1);
477
+ K(E(B)), W(!1), q(!1);
477
478
  },
478
479
  children: A("botlit.common.cancel", "Cancel")
479
480
  }), /* @__PURE__ */ x(f, {
480
481
  type: "submit",
481
482
  form: "kb-edit-form",
482
- leftIcon: /* @__PURE__ */ x(E, { size: 16 }),
483
+ leftIcon: /* @__PURE__ */ x(Be, { size: 16 }),
483
484
  isLoading: et.loading,
484
485
  children: A("botlit.kb.save", "Save")
485
- })] }) : /* @__PURE__ */ x(i, {
486
- permission: r.KNOWLEDGE_UPDATE,
486
+ })] }) : /* @__PURE__ */ x(a, {
487
+ permission: i.KNOWLEDGE_UPDATE,
487
488
  children: /* @__PURE__ */ x(f, {
488
- leftIcon: /* @__PURE__ */ x(D, { size: 16 }),
489
- onClick: () => U(!0),
489
+ leftIcon: /* @__PURE__ */ x(Ve, { size: 16 }),
490
+ onClick: () => W(!0),
490
491
  children: A("botlit.kb.configure", "Configure")
491
492
  })
492
493
  }),
493
- qe(r.KNOWLEDGE_DELETE) && /* @__PURE__ */ x(f, {
494
+ j(i.KNOWLEDGE_DELETE) && /* @__PURE__ */ x(f, {
494
495
  variant: "destructive",
495
- leftIcon: /* @__PURE__ */ x(Ie, { size: 16 }),
496
+ leftIcon: /* @__PURE__ */ x(He, { size: 16 }),
496
497
  isLoading: it.loading,
497
498
  onClick: () => void Ct(),
498
499
  children: A("botlit.common.delete", "Delete")
@@ -503,17 +504,17 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
503
504
  className: "space-y-6",
504
505
  children: [
505
506
  /* @__PURE__ */ x(Ae, {
506
- icon: /* @__PURE__ */ x(T, { size: 18 }),
507
+ icon: /* @__PURE__ */ x(Ie, { size: 18 }),
507
508
  children: A("botlit.kb.purpose", "This knowledge base is one searchable library your agents can draw on. Review how its documents are chunked and indexed, rebuild the index when content changes, and confirm it is healthy, so agents retrieve accurate, up-to-date passages and can cite them in their answers.")
508
509
  }),
509
510
  /* @__PURE__ */ S("p", {
510
511
  role: "status",
511
512
  className: "text-sm text-text-secondary",
512
513
  "data-testid": "kb-status-help",
513
- children: [A(`botlit.kb.statusHelp.${Et.key}`, Et.fallback), J && ` ${A("botlit.kb.refreshing", "This page refreshes by itself while indexing runs.")}`]
514
+ children: [A(`botlit.kb.statusHelp.${Dt.key}`, Dt.fallback), Y && ` ${A("botlit.kb.refreshing", "This page refreshes by itself while indexing runs.")}`]
514
515
  }),
515
- z.totalDocuments === 0 && !J && j && /* @__PURE__ */ x(i, {
516
- permission: r.KNOWLEDGE_MANAGE,
516
+ B.totalDocuments === 0 && !Y && M && /* @__PURE__ */ x(a, {
517
+ permission: i.KNOWLEDGE_MANAGE,
517
518
  children: /* @__PURE__ */ S("div", {
518
519
  className: "flex flex-wrap items-center gap-3 rounded-lg border border-border-subtle p-4",
519
520
  children: [/* @__PURE__ */ x("p", {
@@ -522,7 +523,7 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
522
523
  }), /* @__PURE__ */ x(f, {
523
524
  type: "button",
524
525
  size: "sm",
525
- onClick: () => document.getElementById(Be)?.scrollIntoView({
526
+ onClick: () => document.getElementById(w)?.scrollIntoView({
526
527
  behavior: "smooth",
527
528
  block: "start"
528
529
  }),
@@ -540,19 +541,19 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
540
541
  className: "text-sm text-status-warning-text",
541
542
  children: lt
542
543
  }),
543
- Dt && /* @__PURE__ */ S("div", {
544
+ Ot && /* @__PURE__ */ S("div", {
544
545
  role: "alert",
545
546
  "data-testid": "kb-model-warning",
546
547
  className: "flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm",
547
- children: [/* @__PURE__ */ x(C, {
548
+ children: [/* @__PURE__ */ x(Ne, {
548
549
  size: 16,
549
550
  className: "mt-0.5 shrink-0 text-status-warning-text",
550
551
  "aria-hidden": "true"
551
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", { children: A("botlit.kb.modelWarning", "The embedding model of this knowledge base ({{model}}) is no longer available: it was deleted or turned off, or its provider was. Documents cannot be indexed and searches fail until a usable model is registered again in Settings.", { model: z.embeddingModel }) }), /* @__PURE__ */ x(f, {
552
+ }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", { children: A("botlit.kb.modelWarning", "The embedding model of this knowledge base ({{model}}) is no longer available: it was deleted or turned off, or its provider was. Documents cannot be indexed and searches fail until a usable model is registered again in Settings.", { model: B.embeddingModel }) }), /* @__PURE__ */ x(f, {
552
553
  type: "button",
553
554
  variant: "ghost",
554
555
  className: "px-0",
555
- onClick: () => N("settings"),
556
+ onClick: () => P("settings"),
556
557
  children: A("botlit.kb.form.openSettings", "Open Settings")
557
558
  })] })]
558
559
  }),
@@ -566,14 +567,14 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
566
567
  children: [
567
568
  /* @__PURE__ */ x("div", {
568
569
  className: "mx-auto mb-2 w-fit rounded-full bg-action-primary-bg/10 p-3",
569
- children: /* @__PURE__ */ x(T, {
570
+ children: /* @__PURE__ */ x(Ie, {
570
571
  className: "h-5 w-5 text-primary",
571
572
  "aria-hidden": "true"
572
573
  })
573
574
  }),
574
575
  /* @__PURE__ */ x("p", {
575
576
  className: "text-lg font-bold capitalize text-text-primary",
576
- children: z.indexStatus.toLowerCase()
577
+ children: B.indexStatus.toLowerCase()
577
578
  }),
578
579
  /* @__PURE__ */ x("p", {
579
580
  className: "text-sm text-text-secondary",
@@ -585,7 +586,7 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
585
586
  className: "pt-6 text-center",
586
587
  children: [/* @__PURE__ */ x("p", {
587
588
  className: "text-3xl font-bold text-text-primary",
588
- children: z.totalDocuments
589
+ children: B.totalDocuments
589
590
  }), /* @__PURE__ */ x("p", {
590
591
  className: "text-sm text-text-secondary",
591
592
  children: A("botlit.kb.documents", "Documents")
@@ -595,7 +596,7 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
595
596
  className: "pt-6 text-center",
596
597
  children: [/* @__PURE__ */ x("p", {
597
598
  className: "text-3xl font-bold text-text-primary",
598
- children: z.totalChunks
599
+ children: B.totalChunks
599
600
  }), /* @__PURE__ */ x("p", {
600
601
  className: "text-sm text-text-secondary",
601
602
  children: A("botlit.kb.chunks", "Chunks")
@@ -605,7 +606,7 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
605
606
  className: "pt-6 text-center",
606
607
  children: [/* @__PURE__ */ x("p", {
607
608
  className: "text-3xl font-bold text-text-primary",
608
- children: z.vectorCount
609
+ children: B.vectorCount
609
610
  }), /* @__PURE__ */ x("p", {
610
611
  className: "text-sm text-text-secondary",
611
612
  children: A("botlit.kb.vectors", "Vectors")
@@ -613,10 +614,10 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
613
614
  }) })
614
615
  ]
615
616
  }),
616
- /* @__PURE__ */ x(oe, { knowledgeBaseId: z.id }),
617
+ /* @__PURE__ */ x(oe, { knowledgeBaseId: B.id }),
617
618
  /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ S(u, { children: [/* @__PURE__ */ S(d, {
618
619
  className: "flex items-center gap-2",
619
- children: [/* @__PURE__ */ x(Pe, {
620
+ children: [/* @__PURE__ */ x(Re, {
620
621
  size: 18,
621
622
  "aria-hidden": "true"
622
623
  }), A("botlit.kb.indexConfig", "Index Configuration")]
@@ -627,7 +628,7 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
627
628
  noValidate: !0,
628
629
  onSubmit: (e) => void xt(e),
629
630
  className: "space-y-4",
630
- children: [$, Tt(!1)]
631
+ children: [Et, Tt(!1)]
631
632
  }) : /* @__PURE__ */ S("div", {
632
633
  className: "grid grid-cols-2 gap-6 md:grid-cols-3",
633
634
  children: [
@@ -636,64 +637,64 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
636
637
  children: A("botlit.kb.embeddingModel", "Embedding Model")
637
638
  }), /* @__PURE__ */ x("p", {
638
639
  className: "font-mono text-sm font-medium",
639
- children: z.embeddingModel
640
+ children: B.embeddingModel
640
641
  })] }),
641
642
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
642
643
  className: "text-sm text-text-secondary",
643
644
  children: A("botlit.kb.dimensions", "Dimensions")
644
645
  }), /* @__PURE__ */ x("p", {
645
646
  className: "font-medium",
646
- children: z.embeddingDimensions
647
+ children: B.embeddingDimensions
647
648
  })] }),
648
649
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
649
650
  className: "text-sm text-text-secondary",
650
651
  children: A("botlit.kb.form.strategy", "Chunking Strategy")
651
652
  }), /* @__PURE__ */ x("p", {
652
653
  className: "font-medium",
653
- children: z.chunkingStrategy
654
+ children: B.chunkingStrategy
654
655
  })] }),
655
656
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
656
657
  className: "text-sm text-text-secondary",
657
658
  children: A("botlit.kb.form.chunkSize", "Chunk Size")
658
659
  }), /* @__PURE__ */ x("p", {
659
660
  className: "font-medium",
660
- children: z.chunkSize
661
+ children: B.chunkSize
661
662
  })] }),
662
663
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
663
664
  className: "text-sm text-text-secondary",
664
665
  children: A("botlit.kb.form.chunkOverlap", "Chunk Overlap")
665
666
  }), /* @__PURE__ */ x("p", {
666
667
  className: "font-medium",
667
- children: z.chunkOverlap
668
+ children: B.chunkOverlap
668
669
  })] }),
669
670
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
670
671
  className: "text-sm text-text-secondary",
671
672
  children: A("botlit.kb.lastIndexed", "Last Indexed")
672
673
  }), /* @__PURE__ */ x("p", {
673
674
  className: "font-medium",
674
- children: z.lastIndexedAt ? g(z.lastIndexedAt) : A("botlit.kb.never", "Never")
675
+ children: B.lastIndexedAt ? g(B.lastIndexedAt) : A("botlit.kb.never", "Never")
675
676
  })] })
676
677
  ]
677
678
  })
678
679
  })] }),
679
- j && /* @__PURE__ */ x(i, {
680
- permission: r.KNOWLEDGE_MANAGE,
680
+ M && /* @__PURE__ */ x(a, {
681
+ permission: i.KNOWLEDGE_MANAGE,
681
682
  children: /* @__PURE__ */ x("div", {
682
- id: Be,
683
- children: /* @__PURE__ */ x(re, { knowledgeBaseId: j })
683
+ id: w,
684
+ children: /* @__PURE__ */ x(ne, { knowledgeBaseId: M })
684
685
  })
685
686
  }),
686
- j && /* @__PURE__ */ x(ie, {
687
- knowledgeBaseId: j,
688
- documentTitles: new Map(H.map((e) => [e.id, e.title]))
687
+ M && /* @__PURE__ */ x(re, {
688
+ knowledgeBaseId: M,
689
+ documentTitles: new Map(U.map((e) => [e.id, e.title]))
689
690
  }),
690
691
  /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ S(u, { children: [
691
692
  /* @__PURE__ */ S(d, {
692
693
  className: "flex items-center gap-2",
693
- children: [/* @__PURE__ */ x(Ne, {
694
+ children: [/* @__PURE__ */ x(Le, {
694
695
  size: 18,
695
696
  "aria-hidden": "true"
696
- }), A("botlit.kb.documentsTitle", "Documents ({{count}})", { count: z.totalDocuments })]
697
+ }), A("botlit.kb.documentsTitle", "Documents ({{count}})", { count: B.totalDocuments })]
697
698
  }),
698
699
  /* @__PURE__ */ x(l, { children: A("botlit.kb.documentsHelp", "Source documents indexed into this knowledge base") }),
699
700
  gt.length > 1 && /* @__PURE__ */ S("label", {
@@ -701,17 +702,17 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
701
702
  children: [/* @__PURE__ */ x("span", {
702
703
  className: "text-text-secondary",
703
704
  children: A("botlit.kb.documentFilter.label", "Show")
704
- }), /* @__PURE__ */ S("select", {
705
- className: Ve,
706
- value: q,
705
+ }), /* @__PURE__ */ S(b, {
706
+ className: Ke,
707
+ value: J,
707
708
  onChange: (e) => dt(e.target.value),
708
709
  children: [/* @__PURE__ */ x("option", {
709
710
  value: "",
710
- children: A("botlit.kb.documentFilter.all", "All documents ({{count}})", { count: H.length })
711
+ children: A("botlit.kb.documentFilter.all", "All documents ({{count}})", { count: U.length })
711
712
  }), gt.map(([e, t]) => /* @__PURE__ */ x("option", {
712
713
  value: e,
713
714
  children: A(`botlit.kb.documentFilter.${e.toLowerCase()}`, "{{status}} ({{count}})", {
714
- status: He(e),
715
+ status: qe(e),
715
716
  count: t
716
717
  })
717
718
  }, e))]
@@ -719,17 +720,17 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
719
720
  })
720
721
  ] }), /* @__PURE__ */ x(c, {
721
722
  className: "p-0",
722
- children: V.loading ? /* @__PURE__ */ x("p", {
723
+ children: H.loading ? /* @__PURE__ */ x("p", {
723
724
  role: "status",
724
725
  "aria-busy": "true",
725
726
  className: "p-8 text-center text-text-secondary",
726
727
  children: A("botlit.kb.documentsLoading", "Loading documents…")
727
- }) : V.error ? /* @__PURE__ */ x("div", {
728
+ }) : H.error ? /* @__PURE__ */ x("div", {
728
729
  className: "p-4",
729
- children: /* @__PURE__ */ x(o, {
730
+ children: /* @__PURE__ */ x(ae, {
730
731
  resource: A("botlit.kb.documentsResource", "documents"),
731
- error: V.error,
732
- onRetry: () => void V.refetch()
732
+ error: H.error,
733
+ onRetry: () => void H.refetch()
733
734
  })
734
735
  }) : vt.length > 0 ? /* @__PURE__ */ x("ul", {
735
736
  className: "divide-y divide-border-subtle",
@@ -756,12 +757,12 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
756
757
  ]
757
758
  }), /* @__PURE__ */ S("div", {
758
759
  className: "flex items-center gap-3",
759
- children: [/* @__PURE__ */ x(ce, { status: e.status }), qe(r.KNOWLEDGE_DELETE) && /* @__PURE__ */ x(f, {
760
+ children: [/* @__PURE__ */ x(ce, { status: e.status }), j(i.KNOWLEDGE_DELETE) && /* @__PURE__ */ x(f, {
760
761
  variant: "ghost",
761
762
  size: "icon",
762
763
  "aria-label": A("botlit.kb.document.removeFor", "Remove {{title}}", { title: e.title }),
763
764
  onClick: () => void wt(e),
764
- children: /* @__PURE__ */ x(Ie, {
765
+ children: /* @__PURE__ */ x(He, {
765
766
  size: 16,
766
767
  "aria-hidden": "true"
767
768
  })
@@ -770,27 +771,27 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
770
771
  }, e.id))
771
772
  }) : /* @__PURE__ */ S("div", {
772
773
  className: "p-8 text-center text-text-secondary",
773
- children: [/* @__PURE__ */ x(Me, {
774
+ children: [/* @__PURE__ */ x(Fe, {
774
775
  className: "mx-auto mb-2 h-8 w-8 opacity-50",
775
776
  "aria-hidden": "true"
776
777
  }), /* @__PURE__ */ x("p", { children: A("botlit.kb.noDocuments", "No documents indexed yet") })]
777
778
  })
778
779
  })] }),
779
- j && /* @__PURE__ */ x(i, {
780
- permission: r.KNOWLEDGE_MANAGE,
781
- children: /* @__PURE__ */ x(ee, { knowledgeBaseId: j })
780
+ M && /* @__PURE__ */ x(a, {
781
+ permission: i.KNOWLEDGE_MANAGE,
782
+ children: /* @__PURE__ */ x(r, { knowledgeBaseId: M })
782
783
  }),
783
- j && /* @__PURE__ */ x(te, {
784
- knowledgeBaseId: j,
785
- documents: H
784
+ M && /* @__PURE__ */ x(ee, {
785
+ knowledgeBaseId: M,
786
+ documents: U
786
787
  }),
787
- j && /* @__PURE__ */ x(i, {
788
- permission: r.KNOWLEDGE_MANAGE,
789
- children: /* @__PURE__ */ x(n, { knowledgeBaseId: j })
788
+ M && /* @__PURE__ */ x(a, {
789
+ permission: i.KNOWLEDGE_MANAGE,
790
+ children: /* @__PURE__ */ x(n, { knowledgeBaseId: M })
790
791
  }),
791
792
  /* @__PURE__ */ S(s, { children: [/* @__PURE__ */ x(u, { children: /* @__PURE__ */ S(d, {
792
793
  className: "flex items-center gap-2",
793
- children: [/* @__PURE__ */ x(D, {
794
+ children: [/* @__PURE__ */ x(Ve, {
794
795
  size: 18,
795
796
  "aria-hidden": "true"
796
797
  }), A("botlit.kb.metadata", "Metadata")]
@@ -802,21 +803,21 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
802
803
  children: A("botlit.kb.createdAt", "Created")
803
804
  }), /* @__PURE__ */ x("p", {
804
805
  className: "font-medium",
805
- children: g(z.createdAt)
806
+ children: g(B.createdAt)
806
807
  })] }),
807
808
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
808
809
  className: "text-text-secondary",
809
810
  children: A("botlit.kb.updatedLabel", "Updated")
810
811
  }), /* @__PURE__ */ x("p", {
811
812
  className: "font-medium",
812
- children: g(z.updatedAt)
813
+ children: g(B.updatedAt)
813
814
  })] }),
814
815
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
815
816
  className: "text-text-secondary",
816
817
  children: A("botlit.kb.lastIndexed", "Last Indexed")
817
818
  }), /* @__PURE__ */ x("p", {
818
819
  className: "font-medium",
819
- children: z.lastIndexedAt ? g(z.lastIndexedAt) : "—"
820
+ children: B.lastIndexedAt ? g(B.lastIndexedAt) : "—"
820
821
  })] })
821
822
  ]
822
823
  }) })] })
@@ -824,9 +825,9 @@ var Ge = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface
824
825
  })
825
826
  });
826
827
  };
827
- function Ke(e) {
828
- return Re.find((t) => t === e) ?? "RECURSIVE";
828
+ function k(e) {
829
+ return We.find((t) => t === e) ?? "RECURSIVE";
829
830
  }
830
- export { k as KnowledgeBaseDetailPage };
831
+ export { O as KnowledgeBaseDetailPage };
831
832
 
832
833
  //# sourceMappingURL=KnowledgeBaseDetailPage.js.map