@burdenoff/microfe-botmanor 2026.1027.2 → 2026.1027.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/botlit/BotlitRoutes.js +142 -132
- package/dist/botlit/BotlitRoutes.js.map +1 -1
- package/dist/botlit/components/AgentApprovalPanel.js +144 -126
- package/dist/botlit/components/AgentApprovalPanel.js.map +1 -1
- package/dist/botlit/components/ModelRegistrationPanel.js +4 -4
- package/dist/botlit/components/VersionHistoryPanel.js +92 -83
- package/dist/botlit/components/VersionHistoryPanel.js.map +1 -1
- package/dist/botlit/pages/A2AAgentDetailPage.js +212 -203
- package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/A2ARegistryPage.js +129 -117
- package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
- package/dist/botlit/pages/AgentApprovalsPage.js +122 -110
- package/dist/botlit/pages/AgentApprovalsPage.js.map +1 -1
- package/dist/botlit/pages/AgentBuilderPage.js +18 -18
- package/dist/botlit/pages/AgentDetailPage.js +298 -273
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/AgentsListPage.js +145 -121
- package/dist/botlit/pages/AgentsListPage.js.map +1 -1
- package/dist/botlit/pages/BotChannelsTab.js +238 -226
- package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +307 -288
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/botlit/pages/BotWorkflowTab.js +125 -116
- package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
- package/dist/botlit/pages/BotsListPage.js +159 -144
- package/dist/botlit/pages/BotsListPage.js.map +1 -1
- package/dist/botlit/pages/BucketsPage.js +279 -258
- package/dist/botlit/pages/BucketsPage.js.map +1 -1
- package/dist/botlit/pages/ChannelDetailPage.js +346 -328
- package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
- package/dist/botlit/pages/ChannelRoutesPage.js +10 -10
- package/dist/botlit/pages/ChannelsPage.js +163 -148
- package/dist/botlit/pages/ChannelsPage.js.map +1 -1
- package/dist/botlit/pages/DashboardPage.js +129 -114
- package/dist/botlit/pages/DashboardPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionDetailPage.js +145 -139
- package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionsPage.js +14 -14
- package/dist/botlit/pages/InstalledPackagesPage.js +245 -227
- package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js +168 -156
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBasesPage.js +91 -79
- package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
- package/dist/botlit/pages/MCPServerDetailPage.js +200 -188
- package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -1
- package/dist/botlit/pages/MCPServersPage.js +170 -155
- package/dist/botlit/pages/MCPServersPage.js.map +1 -1
- package/dist/botlit/pages/PoliciesPage.js +113 -104
- package/dist/botlit/pages/PoliciesPage.js.map +1 -1
- package/dist/botlit/pages/PolicyDetailPage.js +145 -133
- package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
- package/dist/botlit/pages/PromptStudioPage.js +106 -97
- package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
- package/dist/botlit/pages/PromptTemplateDetailPage.js +359 -347
- package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
- package/dist/botlit/pages/PromptTemplatesPage.js +127 -112
- package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
- package/dist/botlit/pages/RetrievalProfileDetailPage.js +219 -210
- package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -1
- package/dist/botlit/pages/RetrievalProfilesPage.js +112 -103
- package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
- package/dist/botlit/pages/SettingsPage.js +264 -252
- package/dist/botlit/pages/SettingsPage.js.map +1 -1
- package/dist/botlit/pages/SkillDetailPage.js +235 -226
- package/dist/botlit/pages/SkillDetailPage.js.map +1 -1
- package/dist/botlit/pages/SkillsPage.js +115 -106
- package/dist/botlit/pages/SkillsPage.js.map +1 -1
- package/dist/botlit/pages/StorePackageDetailPage.js +194 -188
- package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
- package/dist/botlit/pages/StorePage.js +161 -155
- package/dist/botlit/pages/StorePage.js.map +1 -1
- package/dist/botlit/permissions/PermissionRequired.js +45 -0
- package/dist/botlit/permissions/PermissionRequired.js.map +1 -0
- package/dist/botlit/permissions/botmanorPermissions.js +72 -0
- package/dist/botlit/permissions/botmanorPermissions.js.map +1 -0
- package/dist/botlit/permissions/index.js +3 -0
- package/dist/botlit/permissions/useBotmanorPermissions.js +19 -0
- package/dist/botlit/permissions/useBotmanorPermissions.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { useBotlit as e } from "../providers/BotlitProvider.js";
|
|
2
|
-
import { useCreateKnowledgeBase as t, useKnowledgeBase as n, useKnowledgeDocuments as ee, useRebuildKnowledgeBaseIndex as
|
|
3
|
-
import { useLLMModels as
|
|
2
|
+
import { useCreateKnowledgeBase as t, useKnowledgeBase as n, useKnowledgeDocuments as ee, useRebuildKnowledgeBaseIndex as te, useUpdateKnowledgeBase as ne } from "../hooks/useKnowledgeBases.js";
|
|
3
|
+
import { useLLMModels as r, useLLMProviders as i } from "../hooks/useLLMProviders.js";
|
|
4
4
|
import { formatRelativeTime as a } from "../utils/formatters.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { BOTMANOR_PERMISSIONS as o } from "../permissions/botmanorPermissions.js";
|
|
6
|
+
import { BotmanorPermissionGate as s } from "../permissions/useBotmanorPermissions.js";
|
|
7
|
+
import { PageLayout as c } from "../components/PageLayout.js";
|
|
8
|
+
import { Button as l } from "../components/Button.js";
|
|
9
|
+
import "../permissions/index.js";
|
|
10
|
+
import { Card as u, CardContent as d, CardDescription as f, CardHeader as p, CardTitle as m } from "../components/Card.js";
|
|
11
|
+
import { StatusBadge as h } from "../components/Badge.js";
|
|
9
12
|
import { EmptyState as re } from "../components/EmptyState.js";
|
|
10
|
-
import { FormField as
|
|
13
|
+
import { FormField as g, Input as _, Textarea as ie } from "../components/Input.js";
|
|
11
14
|
import { configuredEmbeddingModels as ae } from "../utils/embedding-models.js";
|
|
12
15
|
import { KnowledgeSourceImportPanel as oe } from "../components/KnowledgeSourceImportPanel.js";
|
|
13
|
-
import { useEffect as
|
|
14
|
-
import { GlassCard as
|
|
15
|
-
import { Fragment as
|
|
16
|
+
import { useEffect as v, useMemo as y, useState as b } from "react";
|
|
17
|
+
import { GlassCard as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
|
|
18
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
16
19
|
import { useParams as se } from "react-router";
|
|
17
|
-
import { ArrowLeft as ce, Boxes as le, Database as
|
|
18
|
-
import { toast as
|
|
20
|
+
import { ArrowLeft as ce, Boxes as le, Database as E, FileText as ue, Layers as de, RefreshCw as fe, Save as D, Settings as O } from "lucide-react";
|
|
21
|
+
import { toast as k } from "sonner";
|
|
19
22
|
//#region src/botlit/pages/KnowledgeBaseDetailPage.tsx
|
|
20
23
|
var pe = [
|
|
21
24
|
"RECURSIVE",
|
|
22
25
|
"FIXED",
|
|
23
26
|
"SENTENCE"
|
|
24
|
-
],
|
|
27
|
+
], A = {
|
|
25
28
|
name: "",
|
|
26
29
|
description: "",
|
|
27
30
|
embeddingModel: "",
|
|
@@ -30,7 +33,7 @@ var pe = [
|
|
|
30
33
|
chunkSize: 512,
|
|
31
34
|
chunkOverlap: 50
|
|
32
35
|
};
|
|
33
|
-
function
|
|
36
|
+
function j(e) {
|
|
34
37
|
return {
|
|
35
38
|
name: e.name,
|
|
36
39
|
description: e.description ?? "",
|
|
@@ -41,27 +44,27 @@ function k(e) {
|
|
|
41
44
|
chunkOverlap: e.chunkOverlap
|
|
42
45
|
};
|
|
43
46
|
}
|
|
44
|
-
function
|
|
47
|
+
function M(e, t) {
|
|
45
48
|
let n = Number(e);
|
|
46
49
|
return e.trim() !== "" && Number.isFinite(n) ? n : t;
|
|
47
50
|
}
|
|
48
|
-
var
|
|
49
|
-
let { kbId:
|
|
50
|
-
|
|
51
|
-
G && !
|
|
52
|
-
}, [G,
|
|
53
|
-
let
|
|
51
|
+
var N = ({ isNew: N }) => {
|
|
52
|
+
let { kbId: P } = se(), { data: F, loading: I, error: L, refetch: R } = r(), { data: z, loading: B, error: me, refetch: he } = i(), V = I || B, H = L || me, U = y(() => ae(F ?? [], z ?? []), [F, z]), { navigateTo: W } = e(), { data: G, loading: ge, refetch: K } = n(N ? void 0 : P), { data: q } = ee(N ? void 0 : P), [_e, ve] = t(), [ye, be] = ne(), [xe, J] = te(), [Y, X] = b(!1), [Z, Q] = b(A);
|
|
53
|
+
v(() => {
|
|
54
|
+
G && !N && Q(j(G));
|
|
55
|
+
}, [G, N]);
|
|
56
|
+
let Se = async () => {
|
|
54
57
|
if (!(V || H)) {
|
|
55
58
|
if (!Z.name.trim()) {
|
|
56
|
-
|
|
59
|
+
k.error("Name is required");
|
|
57
60
|
return;
|
|
58
61
|
}
|
|
59
62
|
if (!U.some((e) => e.id === Z.embeddingModel)) {
|
|
60
|
-
|
|
63
|
+
k.error("Choose a configured embedding model. Register one in Settings first.");
|
|
61
64
|
return;
|
|
62
65
|
}
|
|
63
66
|
try {
|
|
64
|
-
let e = await
|
|
67
|
+
let e = await _e({
|
|
65
68
|
name: Z.name.trim(),
|
|
66
69
|
description: Z.description.trim() || null,
|
|
67
70
|
embeddingModel: Z.embeddingModel,
|
|
@@ -70,19 +73,19 @@ var j = ({ isNew: j }) => {
|
|
|
70
73
|
chunkSize: Z.chunkSize,
|
|
71
74
|
chunkOverlap: Z.chunkOverlap
|
|
72
75
|
});
|
|
73
|
-
|
|
76
|
+
k.success(`Knowledge base "${e.name}" created`), W(`knowledge/${e.id}`);
|
|
74
77
|
} catch (e) {
|
|
75
|
-
|
|
78
|
+
k.error(e instanceof Error ? e.message : "Failed to create knowledge base");
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
|
-
},
|
|
79
|
-
if (!
|
|
80
|
-
|
|
81
|
+
}, Ce = async () => {
|
|
82
|
+
if (!P || !Z.name.trim()) {
|
|
83
|
+
k.error("Name is required");
|
|
81
84
|
return;
|
|
82
85
|
}
|
|
83
86
|
try {
|
|
84
|
-
await
|
|
85
|
-
kbId:
|
|
87
|
+
await ye({
|
|
88
|
+
kbId: P,
|
|
86
89
|
input: {
|
|
87
90
|
name: Z.name.trim(),
|
|
88
91
|
description: Z.description.trim() || null,
|
|
@@ -90,21 +93,21 @@ var j = ({ isNew: j }) => {
|
|
|
90
93
|
chunkSize: Z.chunkSize,
|
|
91
94
|
chunkOverlap: Z.chunkOverlap
|
|
92
95
|
}
|
|
93
|
-
}), await K(),
|
|
96
|
+
}), await K(), k.success("Knowledge base updated"), X(!1);
|
|
94
97
|
} catch (e) {
|
|
95
|
-
|
|
98
|
+
k.error(e instanceof Error ? e.message : "Failed to update knowledge base");
|
|
96
99
|
}
|
|
97
|
-
},
|
|
98
|
-
if (
|
|
99
|
-
await
|
|
100
|
+
}, we = async () => {
|
|
101
|
+
if (P) try {
|
|
102
|
+
await xe(P), await K(), k.success("Re-indexing started");
|
|
100
103
|
} catch (e) {
|
|
101
|
-
|
|
104
|
+
k.error(e instanceof Error ? e.message : "Failed to rebuild the index");
|
|
102
105
|
}
|
|
103
|
-
}, $ = (e) => /* @__PURE__ */ C
|
|
104
|
-
/* @__PURE__ */
|
|
106
|
+
}, $ = (e) => /* @__PURE__ */ T(C, { children: [
|
|
107
|
+
/* @__PURE__ */ w(g, {
|
|
105
108
|
label: "Name",
|
|
106
109
|
required: !0,
|
|
107
|
-
children: /* @__PURE__ */
|
|
110
|
+
children: /* @__PURE__ */ w(_, {
|
|
108
111
|
placeholder: "e.g., Product Documentation",
|
|
109
112
|
value: Z.name,
|
|
110
113
|
onChange: (e) => Q({
|
|
@@ -113,9 +116,9 @@ var j = ({ isNew: j }) => {
|
|
|
113
116
|
})
|
|
114
117
|
})
|
|
115
118
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ w(g, {
|
|
117
120
|
label: "Description",
|
|
118
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ w(ie, {
|
|
119
122
|
placeholder: "What kind of knowledge will this store?",
|
|
120
123
|
value: Z.description,
|
|
121
124
|
onChange: (e) => Q({
|
|
@@ -125,11 +128,11 @@ var j = ({ isNew: j }) => {
|
|
|
125
128
|
rows: 3
|
|
126
129
|
})
|
|
127
130
|
}),
|
|
128
|
-
e && /* @__PURE__ */
|
|
131
|
+
e && /* @__PURE__ */ T(g, {
|
|
129
132
|
label: "Embedding Model",
|
|
130
133
|
required: !0,
|
|
131
134
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ T("select", {
|
|
133
136
|
className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
|
|
134
137
|
"aria-label": "Embedding Model",
|
|
135
138
|
disabled: V || !!H,
|
|
@@ -142,10 +145,10 @@ var j = ({ isNew: j }) => {
|
|
|
142
145
|
embeddingDimensions: t?.dimensions ?? Z.embeddingDimensions
|
|
143
146
|
});
|
|
144
147
|
},
|
|
145
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ w("option", {
|
|
146
149
|
value: "",
|
|
147
150
|
children: "Choose a configured embedding model"
|
|
148
|
-
}), U.map((e) => /* @__PURE__ */
|
|
151
|
+
}), U.map((e) => /* @__PURE__ */ T("option", {
|
|
149
152
|
value: e.id,
|
|
150
153
|
children: [
|
|
151
154
|
e.label,
|
|
@@ -155,274 +158,283 @@ var j = ({ isNew: j }) => {
|
|
|
155
158
|
]
|
|
156
159
|
}, e.id))]
|
|
157
160
|
}),
|
|
158
|
-
V && /* @__PURE__ */
|
|
161
|
+
V && /* @__PURE__ */ w("p", {
|
|
159
162
|
role: "status",
|
|
160
163
|
children: "Loading configured embedding models…"
|
|
161
164
|
}),
|
|
162
|
-
H && /* @__PURE__ */
|
|
165
|
+
H && /* @__PURE__ */ T("div", {
|
|
163
166
|
role: "alert",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ w("p", { children: "Could not load configured models. Try loading the catalog again." }), /* @__PURE__ */ w(l, {
|
|
165
168
|
variant: "secondary",
|
|
166
169
|
onClick: () => {
|
|
167
|
-
|
|
170
|
+
R(), he();
|
|
168
171
|
},
|
|
169
172
|
children: "Retry model catalog"
|
|
170
173
|
})]
|
|
171
174
|
}),
|
|
172
|
-
!V && !H && U.length === 0 && /* @__PURE__ */
|
|
175
|
+
!V && !H && U.length === 0 && /* @__PURE__ */ w("p", {
|
|
173
176
|
className: "text-sm text-text-secondary",
|
|
174
177
|
children: "Register an embedding model with an active provider in Settings first."
|
|
175
178
|
})
|
|
176
179
|
]
|
|
177
180
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ T("div", {
|
|
179
182
|
className: "grid grid-cols-3 gap-4",
|
|
180
183
|
children: [
|
|
181
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ w(g, {
|
|
182
185
|
label: "Chunking Strategy",
|
|
183
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ w("select", {
|
|
184
187
|
className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
|
|
185
188
|
value: Z.chunkingStrategy,
|
|
186
189
|
onChange: (e) => Q({
|
|
187
190
|
...Z,
|
|
188
191
|
chunkingStrategy: e.target.value
|
|
189
192
|
}),
|
|
190
|
-
children: pe.map((e) => /* @__PURE__ */
|
|
193
|
+
children: pe.map((e) => /* @__PURE__ */ w("option", {
|
|
191
194
|
value: e,
|
|
192
195
|
children: e
|
|
193
196
|
}, e))
|
|
194
197
|
})
|
|
195
198
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ w(g, {
|
|
197
200
|
label: "Chunk Size",
|
|
198
|
-
children: /* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ w(_, {
|
|
199
202
|
type: "number",
|
|
200
203
|
value: Z.chunkSize,
|
|
201
204
|
onChange: (e) => Q({
|
|
202
205
|
...Z,
|
|
203
|
-
chunkSize:
|
|
206
|
+
chunkSize: M(e.target.value, A.chunkSize)
|
|
204
207
|
})
|
|
205
208
|
})
|
|
206
209
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ w(g, {
|
|
208
211
|
label: "Chunk Overlap",
|
|
209
|
-
children: /* @__PURE__ */
|
|
212
|
+
children: /* @__PURE__ */ w(_, {
|
|
210
213
|
type: "number",
|
|
211
214
|
value: Z.chunkOverlap,
|
|
212
215
|
onChange: (e) => Q({
|
|
213
216
|
...Z,
|
|
214
|
-
chunkOverlap:
|
|
217
|
+
chunkOverlap: M(e.target.value, A.chunkOverlap)
|
|
215
218
|
})
|
|
216
219
|
})
|
|
217
220
|
})
|
|
218
221
|
]
|
|
219
222
|
})
|
|
220
223
|
] });
|
|
221
|
-
return
|
|
224
|
+
return N ? /* @__PURE__ */ w(c, {
|
|
222
225
|
title: "Create Knowledge Base",
|
|
223
226
|
description: "Set up an embedding index your agents can retrieve from",
|
|
224
|
-
actions: /* @__PURE__ */
|
|
227
|
+
actions: /* @__PURE__ */ T("div", {
|
|
225
228
|
className: "flex gap-2",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ w(l, {
|
|
227
230
|
variant: "outline",
|
|
228
231
|
onClick: () => W("knowledge"),
|
|
229
232
|
children: "Cancel"
|
|
230
|
-
}), /* @__PURE__ */
|
|
231
|
-
leftIcon: /* @__PURE__ */
|
|
232
|
-
onClick:
|
|
233
|
-
isLoading:
|
|
233
|
+
}), /* @__PURE__ */ w(l, {
|
|
234
|
+
leftIcon: /* @__PURE__ */ w(D, { size: 16 }),
|
|
235
|
+
onClick: Se,
|
|
236
|
+
isLoading: ve.loading,
|
|
234
237
|
disabled: V || !!H || !Z.name.trim(),
|
|
235
238
|
children: "Create"
|
|
236
239
|
})]
|
|
237
240
|
}),
|
|
238
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ w("div", {
|
|
239
242
|
className: "max-w-3xl space-y-6",
|
|
240
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ T(p, { children: [/* @__PURE__ */ w(m, { children: "Index Configuration" }), /* @__PURE__ */ w(f, { children: "The embedding model and its vector width are fixed once documents are indexed." })] }), /* @__PURE__ */ w(d, {
|
|
241
244
|
className: "space-y-4",
|
|
242
245
|
children: $(!0)
|
|
243
246
|
})] })
|
|
244
247
|
})
|
|
245
|
-
}) :
|
|
248
|
+
}) : ge ? /* @__PURE__ */ w(c, {
|
|
246
249
|
title: "Loading...",
|
|
247
|
-
children: /* @__PURE__ */
|
|
248
|
-
}) : G ? /* @__PURE__ */
|
|
249
|
-
title: /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ w("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
|
|
251
|
+
}) : G ? /* @__PURE__ */ w(c, {
|
|
252
|
+
title: /* @__PURE__ */ T("div", {
|
|
250
253
|
className: "flex items-center gap-3",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ w(l, {
|
|
252
255
|
variant: "ghost",
|
|
253
256
|
size: "icon",
|
|
254
257
|
onClick: () => W("knowledge"),
|
|
255
|
-
children: /* @__PURE__ */
|
|
256
|
-
}), /* @__PURE__ */
|
|
258
|
+
children: /* @__PURE__ */ w(ce, { size: 20 })
|
|
259
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
|
|
257
260
|
className: "flex items-center gap-2",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
259
|
-
}), G.description && /* @__PURE__ */
|
|
261
|
+
children: [/* @__PURE__ */ w("span", { children: G.name }), /* @__PURE__ */ w(h, { status: G.indexStatus })]
|
|
262
|
+
}), G.description && /* @__PURE__ */ w("p", {
|
|
260
263
|
className: "text-sm font-normal text-text-secondary",
|
|
261
264
|
children: G.description
|
|
262
265
|
})] })]
|
|
263
266
|
}),
|
|
264
|
-
actions: /* @__PURE__ */
|
|
267
|
+
actions: /* @__PURE__ */ T("div", {
|
|
265
268
|
className: "flex gap-2",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
children: [/* @__PURE__ */ w(s, {
|
|
270
|
+
permission: o.KNOWLEDGE_MANAGE,
|
|
271
|
+
children: /* @__PURE__ */ w(l, {
|
|
272
|
+
variant: "outline",
|
|
273
|
+
leftIcon: /* @__PURE__ */ w(fe, { size: 16 }),
|
|
274
|
+
onClick: we,
|
|
275
|
+
isLoading: J.loading,
|
|
276
|
+
children: "Rebuild Index"
|
|
277
|
+
})
|
|
278
|
+
}), Y ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(l, {
|
|
273
279
|
variant: "outline",
|
|
274
280
|
onClick: () => {
|
|
275
|
-
Q(
|
|
281
|
+
Q(j(G)), X(!1);
|
|
276
282
|
},
|
|
277
283
|
children: "Cancel"
|
|
278
|
-
}), /* @__PURE__ */
|
|
279
|
-
leftIcon: /* @__PURE__ */
|
|
280
|
-
onClick:
|
|
281
|
-
isLoading:
|
|
284
|
+
}), /* @__PURE__ */ w(l, {
|
|
285
|
+
leftIcon: /* @__PURE__ */ w(D, { size: 16 }),
|
|
286
|
+
onClick: Ce,
|
|
287
|
+
isLoading: be.loading,
|
|
282
288
|
children: "Save"
|
|
283
|
-
})] }) : /* @__PURE__ */
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
289
|
+
})] }) : /* @__PURE__ */ w(s, {
|
|
290
|
+
permission: o.KNOWLEDGE_UPDATE,
|
|
291
|
+
children: /* @__PURE__ */ w(l, {
|
|
292
|
+
leftIcon: /* @__PURE__ */ w(O, { size: 16 }),
|
|
293
|
+
onClick: () => X(!0),
|
|
294
|
+
children: "Configure"
|
|
295
|
+
})
|
|
287
296
|
})]
|
|
288
297
|
}),
|
|
289
|
-
children: /* @__PURE__ */
|
|
298
|
+
children: /* @__PURE__ */ T("div", {
|
|
290
299
|
className: "space-y-6",
|
|
291
300
|
children: [
|
|
292
|
-
/* @__PURE__ */ S
|
|
293
|
-
icon: /* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ w(S, {
|
|
302
|
+
icon: /* @__PURE__ */ w(E, { size: 18 }),
|
|
294
303
|
children: "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."
|
|
295
304
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ T("div", {
|
|
297
306
|
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
298
307
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ T(x, {
|
|
300
309
|
treatment: "glass",
|
|
301
310
|
glow: !0,
|
|
302
311
|
className: "p-6 text-center",
|
|
303
312
|
children: [
|
|
304
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ w("div", {
|
|
305
314
|
className: "p-3 rounded-full bg-action-primary-bg/10 w-fit mx-auto mb-2",
|
|
306
|
-
children: /* @__PURE__ */
|
|
315
|
+
children: /* @__PURE__ */ w(E, { className: "h-5 w-5 text-primary" })
|
|
307
316
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ w("p", {
|
|
309
318
|
className: "text-lg font-bold text-text-primary capitalize",
|
|
310
319
|
children: G.indexStatus.toLowerCase()
|
|
311
320
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ w("p", {
|
|
313
322
|
className: "text-sm text-text-secondary",
|
|
314
323
|
children: "Index Status"
|
|
315
324
|
})
|
|
316
325
|
]
|
|
317
326
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ w(u, { children: /* @__PURE__ */ T(d, {
|
|
319
328
|
className: "pt-6 text-center",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ w("p", {
|
|
321
330
|
className: "text-3xl font-bold text-text-primary",
|
|
322
331
|
children: G.totalDocuments
|
|
323
|
-
}), /* @__PURE__ */
|
|
332
|
+
}), /* @__PURE__ */ w("p", {
|
|
324
333
|
className: "text-sm text-text-secondary",
|
|
325
334
|
children: "Documents"
|
|
326
335
|
})]
|
|
327
336
|
}) }),
|
|
328
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ w(u, { children: /* @__PURE__ */ T(d, {
|
|
329
338
|
className: "pt-6 text-center",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ w("p", {
|
|
331
340
|
className: "text-3xl font-bold text-text-primary",
|
|
332
341
|
children: G.totalChunks
|
|
333
|
-
}), /* @__PURE__ */
|
|
342
|
+
}), /* @__PURE__ */ w("p", {
|
|
334
343
|
className: "text-sm text-text-secondary",
|
|
335
344
|
children: "Chunks"
|
|
336
345
|
})]
|
|
337
346
|
}) }),
|
|
338
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ w(u, { children: /* @__PURE__ */ T(d, {
|
|
339
348
|
className: "pt-6 text-center",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ w("p", {
|
|
341
350
|
className: "text-3xl font-bold text-text-primary",
|
|
342
351
|
children: G.vectorCount
|
|
343
|
-
}), /* @__PURE__ */
|
|
352
|
+
}), /* @__PURE__ */ w("p", {
|
|
344
353
|
className: "text-sm text-text-secondary",
|
|
345
354
|
children: "Vectors"
|
|
346
355
|
})]
|
|
347
356
|
}) })
|
|
348
357
|
]
|
|
349
358
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ T(u, { children: [/* @__PURE__ */ T(p, { children: [/* @__PURE__ */ T(m, {
|
|
351
360
|
className: "flex items-center gap-2",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
353
|
-
}), /* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ w(de, { size: 18 }), "Index Configuration"]
|
|
362
|
+
}), /* @__PURE__ */ w(f, { children: "How documents are embedded and split before they are indexed" })] }), /* @__PURE__ */ w(d, {
|
|
354
363
|
className: "space-y-4",
|
|
355
|
-
children: Y ? $(!1) : /* @__PURE__ */
|
|
364
|
+
children: Y ? $(!1) : /* @__PURE__ */ T("div", {
|
|
356
365
|
className: "grid grid-cols-2 md:grid-cols-3 gap-6",
|
|
357
366
|
children: [
|
|
358
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
359
368
|
className: "text-sm text-text-secondary",
|
|
360
369
|
children: "Embedding Model"
|
|
361
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ w("p", {
|
|
362
371
|
className: "font-medium font-mono text-sm",
|
|
363
372
|
children: G.embeddingModel
|
|
364
373
|
})] }),
|
|
365
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
366
375
|
className: "text-sm text-text-secondary",
|
|
367
376
|
children: "Dimensions"
|
|
368
|
-
}), /* @__PURE__ */
|
|
377
|
+
}), /* @__PURE__ */ w("p", {
|
|
369
378
|
className: "font-medium",
|
|
370
379
|
children: G.embeddingDimensions
|
|
371
380
|
})] }),
|
|
372
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
373
382
|
className: "text-sm text-text-secondary",
|
|
374
383
|
children: "Chunking Strategy"
|
|
375
|
-
}), /* @__PURE__ */
|
|
384
|
+
}), /* @__PURE__ */ w("p", {
|
|
376
385
|
className: "font-medium",
|
|
377
386
|
children: G.chunkingStrategy
|
|
378
387
|
})] }),
|
|
379
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
380
389
|
className: "text-sm text-text-secondary",
|
|
381
390
|
children: "Chunk Size"
|
|
382
|
-
}), /* @__PURE__ */
|
|
391
|
+
}), /* @__PURE__ */ w("p", {
|
|
383
392
|
className: "font-medium",
|
|
384
393
|
children: G.chunkSize
|
|
385
394
|
})] }),
|
|
386
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
387
396
|
className: "text-sm text-text-secondary",
|
|
388
397
|
children: "Chunk Overlap"
|
|
389
|
-
}), /* @__PURE__ */
|
|
398
|
+
}), /* @__PURE__ */ w("p", {
|
|
390
399
|
className: "font-medium",
|
|
391
400
|
children: G.chunkOverlap
|
|
392
401
|
})] }),
|
|
393
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
394
403
|
className: "text-sm text-text-secondary",
|
|
395
404
|
children: "Last Indexed"
|
|
396
|
-
}), /* @__PURE__ */
|
|
405
|
+
}), /* @__PURE__ */ w("p", {
|
|
397
406
|
className: "font-medium",
|
|
398
407
|
children: G.lastIndexedAt ? a(G.lastIndexedAt) : "Never"
|
|
399
408
|
})] })
|
|
400
409
|
]
|
|
401
410
|
})
|
|
402
411
|
})] }),
|
|
403
|
-
!
|
|
404
|
-
|
|
412
|
+
!N && P && /* @__PURE__ */ w(s, {
|
|
413
|
+
permission: o.KNOWLEDGE_MANAGE,
|
|
414
|
+
children: /* @__PURE__ */ w(oe, { knowledgeBaseId: P })
|
|
415
|
+
}),
|
|
416
|
+
/* @__PURE__ */ T(u, { children: [/* @__PURE__ */ T(p, { children: [/* @__PURE__ */ T(m, {
|
|
405
417
|
className: "flex items-center gap-2",
|
|
406
418
|
children: [
|
|
407
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ w(ue, { size: 18 }),
|
|
408
420
|
"Documents (",
|
|
409
421
|
q.length,
|
|
410
422
|
")"
|
|
411
423
|
]
|
|
412
|
-
}), /* @__PURE__ */
|
|
424
|
+
}), /* @__PURE__ */ w(f, { children: "Source documents indexed into this knowledge base" })] }), /* @__PURE__ */ w(d, {
|
|
413
425
|
className: "p-0",
|
|
414
|
-
children: q.length > 0 ? /* @__PURE__ */
|
|
426
|
+
children: q.length > 0 ? /* @__PURE__ */ w("div", {
|
|
415
427
|
className: "divide-y divide-border-subtle",
|
|
416
|
-
children: q.map((e) => /* @__PURE__ */
|
|
428
|
+
children: q.map((e) => /* @__PURE__ */ T("div", {
|
|
417
429
|
className: "flex items-center justify-between gap-4 p-4",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
430
|
+
children: [/* @__PURE__ */ T("div", {
|
|
419
431
|
className: "min-w-0",
|
|
420
432
|
children: [
|
|
421
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ w("p", {
|
|
422
434
|
className: "font-medium truncate",
|
|
423
435
|
children: e.title
|
|
424
436
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ T("p", {
|
|
426
438
|
className: "text-sm text-text-secondary",
|
|
427
439
|
children: [
|
|
428
440
|
e.chunkCount,
|
|
@@ -430,42 +442,42 @@ var j = ({ isNew: j }) => {
|
|
|
430
442
|
a(e.addedAt)
|
|
431
443
|
]
|
|
432
444
|
}),
|
|
433
|
-
e.processingError && /* @__PURE__ */
|
|
445
|
+
e.processingError && /* @__PURE__ */ w("p", {
|
|
434
446
|
className: "mt-1 text-sm text-status-error-text",
|
|
435
447
|
children: e.processingError
|
|
436
448
|
})
|
|
437
449
|
]
|
|
438
|
-
}), /* @__PURE__ */
|
|
450
|
+
}), /* @__PURE__ */ w(h, { status: e.status })]
|
|
439
451
|
}, e.id))
|
|
440
|
-
}) : /* @__PURE__ */
|
|
452
|
+
}) : /* @__PURE__ */ T("div", {
|
|
441
453
|
className: "p-8 text-center text-text-secondary",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
454
|
+
children: [/* @__PURE__ */ w(le, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }), /* @__PURE__ */ w("p", { children: "No documents indexed yet" })]
|
|
443
455
|
})
|
|
444
456
|
})] }),
|
|
445
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w(p, { children: /* @__PURE__ */ T(m, {
|
|
446
458
|
className: "flex items-center gap-2",
|
|
447
|
-
children: [/* @__PURE__ */
|
|
448
|
-
}) }), /* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ w(O, { size: 18 }), "Metadata"]
|
|
460
|
+
}) }), /* @__PURE__ */ w(d, { children: /* @__PURE__ */ T("div", {
|
|
449
461
|
className: "grid grid-cols-2 md:grid-cols-3 gap-6 text-sm",
|
|
450
462
|
children: [
|
|
451
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
452
464
|
className: "text-text-secondary",
|
|
453
465
|
children: "Created"
|
|
454
|
-
}), /* @__PURE__ */
|
|
466
|
+
}), /* @__PURE__ */ w("p", {
|
|
455
467
|
className: "font-medium",
|
|
456
468
|
children: a(G.createdAt)
|
|
457
469
|
})] }),
|
|
458
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
459
471
|
className: "text-text-secondary",
|
|
460
472
|
children: "Updated"
|
|
461
|
-
}), /* @__PURE__ */
|
|
473
|
+
}), /* @__PURE__ */ w("p", {
|
|
462
474
|
className: "font-medium",
|
|
463
475
|
children: a(G.updatedAt)
|
|
464
476
|
})] }),
|
|
465
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
466
478
|
className: "text-text-secondary",
|
|
467
479
|
children: "Last Indexed"
|
|
468
|
-
}), /* @__PURE__ */
|
|
480
|
+
}), /* @__PURE__ */ w("p", {
|
|
469
481
|
className: "font-medium",
|
|
470
482
|
children: G.lastIndexedAt ? a(G.lastIndexedAt) : "—"
|
|
471
483
|
})] })
|
|
@@ -473,13 +485,13 @@ var j = ({ isNew: j }) => {
|
|
|
473
485
|
}) })] })
|
|
474
486
|
]
|
|
475
487
|
})
|
|
476
|
-
}) : /* @__PURE__ */
|
|
488
|
+
}) : /* @__PURE__ */ w(c, {
|
|
477
489
|
title: "Knowledge Base Not Found",
|
|
478
|
-
children: /* @__PURE__ */
|
|
490
|
+
children: /* @__PURE__ */ w(re, {
|
|
479
491
|
illustration: "empty-files",
|
|
480
492
|
title: "Knowledge Base Not Found",
|
|
481
493
|
description: "This knowledge base doesn't exist.",
|
|
482
|
-
action: /* @__PURE__ */
|
|
494
|
+
action: /* @__PURE__ */ w(l, {
|
|
483
495
|
onClick: () => W("knowledge"),
|
|
484
496
|
children: "Back to Knowledge Bases"
|
|
485
497
|
})
|
|
@@ -487,6 +499,6 @@ var j = ({ isNew: j }) => {
|
|
|
487
499
|
});
|
|
488
500
|
};
|
|
489
501
|
//#endregion
|
|
490
|
-
export {
|
|
502
|
+
export { N as KnowledgeBaseDetailPage };
|
|
491
503
|
|
|
492
504
|
//# sourceMappingURL=KnowledgeBaseDetailPage.js.map
|