@burdenoff/microfe-botmanor 2026.1203.4 → 2026.1203.6

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