@burdenoff/microfe-botmanor 2026.1127.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.
- package/dist/botlit/BotmanorRootInner.js +45 -44
- package/dist/botlit/BotmanorRootInner.js.map +1 -1
- package/dist/botlit/components/AgentA2APanel.js +63 -62
- package/dist/botlit/components/AgentA2APanel.js.map +1 -1
- package/dist/botlit/components/AgentBindingsPanel.js +125 -124
- package/dist/botlit/components/AgentBindingsPanel.js.map +1 -1
- package/dist/botlit/components/AgentFallbackModelsPicker.js +56 -55
- package/dist/botlit/components/AgentFallbackModelsPicker.js.map +1 -1
- package/dist/botlit/components/AiOperationsPanel.js.map +1 -1
- package/dist/botlit/components/AssistantChannelPanel.js +40 -39
- package/dist/botlit/components/AssistantChannelPanel.js.map +1 -1
- package/dist/botlit/components/AssistantRuntimeSetupPanel.js +36 -35
- package/dist/botlit/components/AssistantRuntimeSetupPanel.js.map +1 -1
- package/dist/botlit/components/BotAgentsPanel.js +104 -103
- package/dist/botlit/components/BotAgentsPanel.js.map +1 -1
- package/dist/botlit/components/BotFormFields.js +118 -117
- package/dist/botlit/components/BotFormFields.js.map +1 -1
- package/dist/botlit/components/BucketDialogs.js +110 -110
- package/dist/botlit/components/BucketDialogs.js.map +1 -1
- package/dist/botlit/components/ChannelRoutesPanel.js +29 -28
- package/dist/botlit/components/ChannelRoutesPanel.js.map +1 -1
- package/dist/botlit/components/CreateChannelRouteDialog.js +105 -105
- package/dist/botlit/components/CreateChannelRouteDialog.js.map +1 -1
- package/dist/botlit/components/DescribeBotDialog.js +86 -86
- package/dist/botlit/components/DescribeBotDialog.js.map +1 -1
- package/dist/botlit/components/EmptyState.d.ts +8 -0
- package/dist/botlit/components/EmptyState.js +43 -30
- package/dist/botlit/components/EmptyState.js.map +1 -1
- package/dist/botlit/components/HandoffConfigPanel.js +125 -124
- package/dist/botlit/components/HandoffConfigPanel.js.map +1 -1
- package/dist/botlit/components/HandoffTargetPickers.js +42 -41
- package/dist/botlit/components/HandoffTargetPickers.js.map +1 -1
- package/dist/botlit/components/KnowledgeBackendMigrationPanel.js +106 -105
- package/dist/botlit/components/KnowledgeBackendMigrationPanel.js.map +1 -1
- package/dist/botlit/components/KnowledgeRetrievalTestPanel.js +76 -75
- package/dist/botlit/components/KnowledgeRetrievalTestPanel.js.map +1 -1
- package/dist/botlit/components/KnowledgeSourceImportPanel.js +76 -75
- package/dist/botlit/components/KnowledgeSourceImportPanel.js.map +1 -1
- package/dist/botlit/components/ModelRegistrationPanel.js +70 -69
- package/dist/botlit/components/ModelRegistrationPanel.js.map +1 -1
- package/dist/botlit/components/StorePackageDraftCard.js +87 -86
- package/dist/botlit/components/StorePackageDraftCard.js.map +1 -1
- package/dist/botlit/components/SuggestionsPanel.js.map +1 -1
- package/dist/botlit/pages/A2AAgentDetailPage.js +263 -262
- package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/A2ARegistryPage.js +47 -46
- package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
- package/dist/botlit/pages/AgentBuilderPage.js +426 -425
- package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
- package/dist/botlit/pages/AgentDetailPage.js +1 -0
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/AgentsListPage.js +248 -247
- package/dist/botlit/pages/AgentsListPage.js.map +1 -1
- package/dist/botlit/pages/BotChannelsTab.js +324 -310
- package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +1 -0
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/botlit/pages/BotWorkflowTab.js +126 -121
- package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
- package/dist/botlit/pages/BotsListPage.js +1 -0
- package/dist/botlit/pages/BotsListPage.js.map +1 -1
- package/dist/botlit/pages/BucketDetailPage.js +1 -0
- package/dist/botlit/pages/BucketDetailPage.js.map +1 -1
- package/dist/botlit/pages/BucketsPage.js +1 -0
- package/dist/botlit/pages/BucketsPage.js.map +1 -1
- package/dist/botlit/pages/ChannelDetailPage.js +267 -266
- package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
- package/dist/botlit/pages/ChannelsPage.js +187 -186
- package/dist/botlit/pages/ChannelsPage.js.map +1 -1
- package/dist/botlit/pages/ChatPage.js +69 -68
- package/dist/botlit/pages/ChatPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionDetailPage.js +1 -0
- package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionsPage.js +191 -191
- package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
- package/dist/botlit/pages/HandoffsPage.js +65 -64
- package/dist/botlit/pages/HandoffsPage.js.map +1 -1
- package/dist/botlit/pages/InstalledPackagesPage.js +146 -145
- package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js +235 -234
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBasesPage.js +152 -151
- package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
- package/dist/botlit/pages/MCPServerDetailPage.js +180 -179
- package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -1
- package/dist/botlit/pages/MCPServersPage.js +145 -145
- package/dist/botlit/pages/MCPServersPage.js.map +1 -1
- package/dist/botlit/pages/PoliciesPage.js.map +1 -1
- package/dist/botlit/pages/PolicyDetailPage.js +293 -292
- package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
- package/dist/botlit/pages/PromptStudioPage.js +229 -229
- package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
- package/dist/botlit/pages/PromptTemplateDetailPage.js +280 -279
- package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
- package/dist/botlit/pages/PromptTemplatesPage.js +31 -30
- package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
- package/dist/botlit/pages/RetrievalProfileDetailPage.js +204 -203
- package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -1
- package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
- package/dist/botlit/pages/SettingsPage.js +153 -153
- package/dist/botlit/pages/SettingsPage.js.map +1 -1
- package/dist/botlit/pages/SkillDetailPage.js +305 -304
- package/dist/botlit/pages/SkillDetailPage.js.map +1 -1
- package/dist/botlit/pages/SkillsPage.js.map +1 -1
- package/dist/botlit/pages/StorePackageDetailPage.js +1 -0
- package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
- package/dist/botlit/pages/StorePage.js +173 -173
- package/dist/botlit/pages/StorePage.js.map +1 -1
- package/dist/botlit/utils/confirmAction.d.ts +13 -11
- package/dist/botlit/utils/confirmAction.js +26 -4
- package/dist/botlit/utils/confirmAction.js.map +1 -1
- package/package.json +3 -3
|
@@ -18,20 +18,20 @@ import { DescribeBotDialog as ce } from "../components/DescribeBotDialog.js";
|
|
|
18
18
|
import { useKnowledgeBases as le } from "../hooks/useKnowledgeBases.js";
|
|
19
19
|
import { useLLMModels as ue, useLLMProviders as de } from "../hooks/useLLMProviders.js";
|
|
20
20
|
import { useMCPServers as fe } from "../hooks/useMCPServers.js";
|
|
21
|
-
import { AGENT_DEFAULTS as _, AGENT_FIELD_MESSAGES as pe, AGENT_FIELD_TAB as
|
|
21
|
+
import { AGENT_DEFAULTS as _, AGENT_FIELD_MESSAGES as pe, AGENT_FIELD_TAB as me, AGENT_MAX_CONCURRENT_RANGE as v, AGENT_MAX_TOKENS_RANGE as y, AGENT_TEMPERATURE_RANGE as b, OFFERED_CAPABILITIES as he, agentSlugFor as ge, capabilityWarnings as _e, parseNumberField as x, validateAgentForm as ve } from "../utils/agentSettings.js";
|
|
22
22
|
import "../permissions/index.js";
|
|
23
|
-
import { cn as
|
|
24
|
-
import { configuredAnswerModels as
|
|
25
|
-
import { slugify as
|
|
26
|
-
import { toUnion as
|
|
27
|
-
import { useMemo as
|
|
28
|
-
import { PagePurpose as
|
|
29
|
-
import { jsx as
|
|
30
|
-
import { useParams as
|
|
31
|
-
import { AlertTriangle as
|
|
32
|
-
import { toast as
|
|
23
|
+
import { cn as ye } from "../utils/cn.js";
|
|
24
|
+
import { configuredAnswerModels as be } from "../utils/embedding-models.js";
|
|
25
|
+
import { slugify as xe } from "../utils/botIdentity.js";
|
|
26
|
+
import { toUnion as S } from "../utils/unions.js";
|
|
27
|
+
import { useMemo as Se, useRef as Ce, useState as C } from "react";
|
|
28
|
+
import { PagePurpose as we, ThemedSelect as Te } from "@burdenoff/fe-libs/ui";
|
|
29
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
30
|
+
import { useParams as E } from "react-router";
|
|
31
|
+
import { AlertTriangle as D, ArrowLeft as Ee, Brain as De, Save as Oe, Settings as ke, Sparkles as Ae, Wrench as je } from "lucide-react";
|
|
32
|
+
import { toast as O } from "sonner";
|
|
33
33
|
// src/botlit/pages/AgentBuilderPage.tsx
|
|
34
|
-
var
|
|
34
|
+
var k = [
|
|
35
35
|
"MCP_TOOLS",
|
|
36
36
|
"RAG",
|
|
37
37
|
"REASONING",
|
|
@@ -40,19 +40,19 @@ var A = [
|
|
|
40
40
|
"CODE_EXECUTION",
|
|
41
41
|
"A2A",
|
|
42
42
|
"WEB_BROWSING"
|
|
43
|
-
],
|
|
43
|
+
], Me = [
|
|
44
44
|
"ASSISTANT",
|
|
45
45
|
"ANALYST",
|
|
46
46
|
"AUTOMATION",
|
|
47
47
|
"SPECIALIST"
|
|
48
48
|
];
|
|
49
|
-
function
|
|
49
|
+
function Ne(e) {
|
|
50
50
|
return e.flatMap((e) => {
|
|
51
|
-
let t =
|
|
51
|
+
let t = k.find((t) => t === e);
|
|
52
52
|
return t ? [t] : [];
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
var
|
|
55
|
+
var A = "🤖", Pe = [
|
|
56
56
|
{
|
|
57
57
|
emoji: "🤖",
|
|
58
58
|
key: "robot",
|
|
@@ -113,20 +113,20 @@ var j = "🤖", Me = [
|
|
|
113
113
|
key: "rocket",
|
|
114
114
|
label: "Rocket"
|
|
115
115
|
}
|
|
116
|
-
],
|
|
116
|
+
], j = "You are a helpful AI assistant. Be concise, accurate, and friendly.", M = [
|
|
117
117
|
"basics",
|
|
118
118
|
"prompt",
|
|
119
119
|
"model",
|
|
120
120
|
"tools"
|
|
121
121
|
];
|
|
122
|
-
function
|
|
122
|
+
function Fe(e) {
|
|
123
123
|
return e ? {
|
|
124
124
|
name: e.name,
|
|
125
125
|
slug: e.slug,
|
|
126
126
|
description: e.description ?? "",
|
|
127
|
-
avatar: e.avatar ||
|
|
127
|
+
avatar: e.avatar || A,
|
|
128
128
|
type: e.type || "ASSISTANT",
|
|
129
|
-
visibility:
|
|
129
|
+
visibility: S(e.visibility, Ie, "PRIVATE"),
|
|
130
130
|
systemPrompt: e.systemPrompt ?? "",
|
|
131
131
|
temperature: e.temperature == null ? "" : String(e.temperature),
|
|
132
132
|
maxTokens: e.maxTokens == null ? "" : String(e.maxTokens),
|
|
@@ -140,10 +140,10 @@ function Ne(e) {
|
|
|
140
140
|
name: "",
|
|
141
141
|
slug: "",
|
|
142
142
|
description: "",
|
|
143
|
-
avatar:
|
|
143
|
+
avatar: A,
|
|
144
144
|
type: "ASSISTANT",
|
|
145
145
|
visibility: "PRIVATE",
|
|
146
|
-
systemPrompt:
|
|
146
|
+
systemPrompt: j,
|
|
147
147
|
temperature: "",
|
|
148
148
|
maxTokens: "",
|
|
149
149
|
maxConcurrentExecutions: "",
|
|
@@ -154,283 +154,284 @@ function Ne(e) {
|
|
|
154
154
|
mcpConnectionIds: []
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
var
|
|
157
|
+
var Ie = [
|
|
158
158
|
"PRIVATE",
|
|
159
159
|
"WORKSPACE",
|
|
160
160
|
"PUBLIC"
|
|
161
|
-
],
|
|
162
|
-
let r = e(), { agentId: i, botId: a } =
|
|
163
|
-
return i ? l ? /* @__PURE__ */
|
|
161
|
+
], Le = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", N = () => {
|
|
162
|
+
let r = e(), { agentId: i, botId: a } = E(), { navigateTo: o } = t(), { data: s, loading: l, error: d, refetch: f } = g(i);
|
|
163
|
+
return i ? l ? /* @__PURE__ */ w(n, {
|
|
164
164
|
title: r("botlit.agentBuilder.editTitle", "Edit Agent"),
|
|
165
|
-
children: /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ w("div", {
|
|
166
166
|
role: "status",
|
|
167
167
|
"aria-busy": "true",
|
|
168
168
|
"aria-label": r("botlit.common.loading", "Loading..."),
|
|
169
169
|
className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg"
|
|
170
170
|
})
|
|
171
|
-
}) : d ? /* @__PURE__ */
|
|
171
|
+
}) : d ? /* @__PURE__ */ w(n, {
|
|
172
172
|
title: r("botlit.agentBuilder.editTitle", "Edit Agent"),
|
|
173
|
-
children: /* @__PURE__ */
|
|
173
|
+
children: /* @__PURE__ */ w(p, {
|
|
174
174
|
resource: r("botlit.agentBuilder.resource", "this agent"),
|
|
175
175
|
error: d,
|
|
176
176
|
onRetry: () => void f()
|
|
177
177
|
})
|
|
178
|
-
}) : s ? /* @__PURE__ */
|
|
178
|
+
}) : s ? /* @__PURE__ */ w(P, {
|
|
179
179
|
agent: s,
|
|
180
180
|
botId: a
|
|
181
|
-
}, s.id) : /* @__PURE__ */
|
|
181
|
+
}, s.id) : /* @__PURE__ */ w(n, {
|
|
182
182
|
title: r("botlit.agentDetail.notFound.title", "Agent Not Found"),
|
|
183
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ w(u, {
|
|
184
|
+
kind: "not-found",
|
|
184
185
|
illustration: "empty-agents",
|
|
185
186
|
title: r("botlit.agentDetail.notFound.title", "Agent Not Found"),
|
|
186
187
|
description: r("botlit.agentDetail.notFound.description", "The agent you're looking for doesn't exist."),
|
|
187
|
-
action: /* @__PURE__ */
|
|
188
|
+
action: /* @__PURE__ */ w(c, {
|
|
188
189
|
onClick: () => o(a ? `bots/${a}/agents` : "agents"),
|
|
189
190
|
children: r("botlit.agentDetail.notFound.backAction", "Back to Agents")
|
|
190
191
|
})
|
|
191
192
|
})
|
|
192
|
-
}) : /* @__PURE__ */
|
|
193
|
-
},
|
|
194
|
-
let
|
|
195
|
-
capabilities:
|
|
196
|
-
mcpServerCount:
|
|
197
|
-
knowledgeBaseCount:
|
|
198
|
-
}),
|
|
193
|
+
}) : /* @__PURE__ */ w(P, { botId: a });
|
|
194
|
+
}, P = ({ agent: u, botId: g }) => {
|
|
195
|
+
let E = e(), { navigateTo: k, workspaceId: A } = t(), j = !!u, N = g ? `bots/${g}/agents` : "agents", P = u ? `${N}/${u.id}` : N, [F, ze] = C(() => Fe(u)), [I, Be] = C("basics"), [L, Ve] = C(!1), He = Ce({}), [Ue, We] = ne(), [Ge, Ke] = re(), [qe] = oe(), [Je] = ae(), { data: Ye, loading: Xe, error: R, refetch: Ze } = ie(g), Qe = ee(), z = We.loading || Ke.loading, B = !!g && !u, { data: V, loading: $e, error: et, refetch: tt } = de(), { data: nt, loading: rt, error: it, refetch: at } = ue(), H = $e || rt, U = et || it, W = be(nt ?? [], V ?? []), { data: G, loading: ot, error: st, refetch: ct } = le(), { data: lt, loading: ut, error: dt, refetch: ft } = fe(), K = Se(() => ve(F), [F]), pt = Object.keys(K).length, mt = (e) => L && Object.keys(K).some((t) => me[t] === e), q = _e({
|
|
196
|
+
capabilities: F.capabilities,
|
|
197
|
+
mcpServerCount: F.mcpConnectionIds.length,
|
|
198
|
+
knowledgeBaseCount: F.knowledgeBaseIds.length
|
|
199
|
+
}), ht = F.llmModelId === "", J = (e, t) => ze((n) => ({
|
|
199
200
|
...n,
|
|
200
201
|
[e]: t
|
|
201
|
-
})),
|
|
202
|
+
})), Y = (e, t) => ze((n) => ({
|
|
202
203
|
...n,
|
|
203
204
|
[e]: n[e].includes(t) ? n[e].filter((e) => e !== t) : [...n[e], t]
|
|
204
|
-
})),
|
|
205
|
-
let t =
|
|
206
|
-
if (t) return
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
let n =
|
|
211
|
-
r !== void 0 && (e.preventDefault(),
|
|
212
|
-
},
|
|
205
|
+
})), X = (e) => {
|
|
206
|
+
let t = L ? K[e] : void 0;
|
|
207
|
+
if (t) return E(`botlit.agentBuilder.errors.${t}`, pe[t]);
|
|
208
|
+
}, Z = (e) => `agent-form-${e}`, Q = (e) => {
|
|
209
|
+
Be(e), He.current[e]?.focus();
|
|
210
|
+
}, gt = (e, t) => {
|
|
211
|
+
let n = M.length - 1, r = e.key === "ArrowRight" ? (t + 1) % M.length : e.key === "ArrowLeft" ? (t - 1 + M.length) % M.length : e.key === "Home" ? 0 : e.key === "End" ? n : void 0;
|
|
212
|
+
r !== void 0 && (e.preventDefault(), Q(M[r]));
|
|
213
|
+
}, _t = [
|
|
213
214
|
{
|
|
214
215
|
id: "basics",
|
|
215
|
-
label:
|
|
216
|
-
icon: /* @__PURE__ */
|
|
216
|
+
label: E("botlit.agentBuilder.tabs.basics", "Basic Info"),
|
|
217
|
+
icon: /* @__PURE__ */ w(Ae, { size: 18 })
|
|
217
218
|
},
|
|
218
219
|
{
|
|
219
220
|
id: "prompt",
|
|
220
|
-
label:
|
|
221
|
-
icon: /* @__PURE__ */
|
|
221
|
+
label: E("botlit.agentBuilder.tabs.prompt", "Prompt"),
|
|
222
|
+
icon: /* @__PURE__ */ w(De, { size: 18 })
|
|
222
223
|
},
|
|
223
224
|
{
|
|
224
225
|
id: "model",
|
|
225
|
-
label:
|
|
226
|
-
icon: /* @__PURE__ */
|
|
226
|
+
label: E("botlit.agentBuilder.tabs.model", "LLM Model"),
|
|
227
|
+
icon: /* @__PURE__ */ w(ke, { size: 18 })
|
|
227
228
|
},
|
|
228
229
|
{
|
|
229
230
|
id: "tools",
|
|
230
|
-
label:
|
|
231
|
-
icon: /* @__PURE__ */
|
|
231
|
+
label: E("botlit.agentBuilder.tabs.tools", "Tools & Knowledge"),
|
|
232
|
+
icon: /* @__PURE__ */ w(je, { size: 18 })
|
|
232
233
|
}
|
|
233
|
-
],
|
|
234
|
-
if (e.preventDefault(),
|
|
235
|
-
if (
|
|
236
|
-
|
|
234
|
+
], vt = async (e) => {
|
|
235
|
+
if (e.preventDefault(), z || B && Xe) return;
|
|
236
|
+
if (B && R) {
|
|
237
|
+
O.error(E("botlit.agentBuilder.botUnavailable", "The bot could not be read, so the agent cannot be linked to it yet. Try again."));
|
|
237
238
|
return;
|
|
238
239
|
}
|
|
239
|
-
if (!
|
|
240
|
-
|
|
240
|
+
if (!A) {
|
|
241
|
+
O.error(E("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again."));
|
|
241
242
|
return;
|
|
242
243
|
}
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
let e =
|
|
246
|
-
e &&
|
|
244
|
+
if (pt > 0) {
|
|
245
|
+
Ve(!0);
|
|
246
|
+
let e = M.find((e) => Object.keys(K).some((t) => me[t] === e));
|
|
247
|
+
e && Q(e);
|
|
247
248
|
return;
|
|
248
249
|
}
|
|
249
|
-
let t =
|
|
250
|
-
if (
|
|
251
|
-
if (
|
|
252
|
-
|
|
250
|
+
let t = F.llmModelId !== (u?.llmModelId ?? "");
|
|
251
|
+
if (F.llmModelId && t) {
|
|
252
|
+
if (H) {
|
|
253
|
+
O.error(E("botlit.agentBuilder.modelLoading", "The model list is still loading. Try again in a moment.")), Q("model");
|
|
253
254
|
return;
|
|
254
255
|
}
|
|
255
|
-
if (
|
|
256
|
-
|
|
256
|
+
if (U || !W.some((e) => e.id === F.llmModelId)) {
|
|
257
|
+
O.error(E("botlit.agentBuilder.modelUnavailable", "Choose an active answer model from the available catalog.")), Q("model");
|
|
257
258
|
return;
|
|
258
259
|
}
|
|
259
260
|
}
|
|
260
|
-
let n =
|
|
261
|
+
let n = F.name.trim(), r = ge(n, F.slug), i = x(F.temperature), a = x(F.maxTokens), o = x(F.maxConcurrentExecutions), s = F.description.trim(), c = S(F.type, Me, "ASSISTANT"), l = Ne(F.capabilities);
|
|
261
262
|
try {
|
|
262
263
|
if (u) {
|
|
263
|
-
await
|
|
264
|
+
await Ge({
|
|
264
265
|
agentId: u.id,
|
|
265
266
|
input: {
|
|
266
267
|
name: n,
|
|
267
268
|
slug: r,
|
|
268
269
|
description: s === "" ? null : s,
|
|
269
|
-
avatar:
|
|
270
|
-
systemPrompt:
|
|
270
|
+
avatar: F.avatar,
|
|
271
|
+
systemPrompt: F.systemPrompt.trim(),
|
|
271
272
|
temperature: i ?? null,
|
|
272
273
|
maxTokens: a ?? null,
|
|
273
274
|
maxConcurrentExecutions: o ?? null,
|
|
274
275
|
capabilities: l,
|
|
275
|
-
llmModelId:
|
|
276
|
-
fallbackModelIds:
|
|
277
|
-
knowledgeBaseIds:
|
|
278
|
-
mcpConnectionIds:
|
|
276
|
+
llmModelId: F.llmModelId === "" ? null : F.llmModelId,
|
|
277
|
+
fallbackModelIds: F.fallbackModelIds.filter((e) => e !== F.llmModelId),
|
|
278
|
+
knowledgeBaseIds: F.knowledgeBaseIds,
|
|
279
|
+
mcpConnectionIds: F.mcpConnectionIds,
|
|
279
280
|
type: c,
|
|
280
|
-
visibility:
|
|
281
|
+
visibility: F.visibility
|
|
281
282
|
}
|
|
282
|
-
}),
|
|
283
|
+
}), O.success(E("botlit.agentBuilder.updated", "Agent \"{{name}}\" updated successfully", { name: n })), k(P);
|
|
283
284
|
return;
|
|
284
285
|
}
|
|
285
|
-
let e = await
|
|
286
|
-
workspaceId:
|
|
286
|
+
let e = await Ue({
|
|
287
|
+
workspaceId: A,
|
|
287
288
|
name: n,
|
|
288
289
|
slug: r,
|
|
289
290
|
type: c,
|
|
290
291
|
description: s === "" ? void 0 : s,
|
|
291
|
-
avatar:
|
|
292
|
-
systemPrompt:
|
|
292
|
+
avatar: F.avatar,
|
|
293
|
+
systemPrompt: F.systemPrompt.trim(),
|
|
293
294
|
temperature: i,
|
|
294
295
|
maxTokens: a,
|
|
295
296
|
maxConcurrentExecutions: o,
|
|
296
297
|
capabilities: l,
|
|
297
|
-
llmModelId:
|
|
298
|
-
fallbackModelIds:
|
|
299
|
-
knowledgeBaseIds:
|
|
300
|
-
mcpConnectionIds:
|
|
301
|
-
visibility:
|
|
298
|
+
llmModelId: F.llmModelId === "" ? void 0 : F.llmModelId,
|
|
299
|
+
fallbackModelIds: F.fallbackModelIds.filter((e) => e !== F.llmModelId),
|
|
300
|
+
knowledgeBaseIds: F.knowledgeBaseIds,
|
|
301
|
+
mcpConnectionIds: F.mcpConnectionIds,
|
|
302
|
+
visibility: F.visibility
|
|
302
303
|
});
|
|
303
|
-
if (
|
|
304
|
-
if (!
|
|
305
|
-
|
|
304
|
+
if (O.success(E("botlit.agentBuilder.created", "Agent \"{{name}}\" created successfully", { name: n })), g) {
|
|
305
|
+
if (!Qe(f.APP_AGENT_CREATE)) {
|
|
306
|
+
O.error(E("botlit.agentBuilder.linkNotAllowed", "The agent was created, but you are not allowed to link agents to bots, so it is not linked.")), k(`agents/${e.id}`);
|
|
306
307
|
return;
|
|
307
308
|
}
|
|
308
309
|
try {
|
|
309
|
-
await
|
|
310
|
+
await qe({
|
|
310
311
|
botId: g,
|
|
311
312
|
agentId: e.id
|
|
312
313
|
});
|
|
313
314
|
} catch (t) {
|
|
314
|
-
|
|
315
|
+
O.error(t instanceof Error ? E("botlit.agentBuilder.linkFailed", "The agent was created but could not be linked to the bot: {{message}}", { message: t.message }) : E("botlit.agentBuilder.linkFailedShort", "The agent was created but could not be linked to the bot")), k(`agents/${e.id}`);
|
|
315
316
|
return;
|
|
316
317
|
}
|
|
317
|
-
if (
|
|
318
|
-
await
|
|
318
|
+
if (Ye && !Ye.defaultAgentId && Qe(f.APP_UPDATE)) try {
|
|
319
|
+
await Je({
|
|
319
320
|
botId: g,
|
|
320
321
|
input: { defaultAgentId: e.id }
|
|
321
322
|
});
|
|
322
323
|
} catch (e) {
|
|
323
|
-
|
|
324
|
+
O.error(e instanceof Error ? E("botlit.agentBuilder.defaultFailed", "The agent was linked, but it could not be set as the bot default: {{message}}", { message: e.message }) : E("botlit.agentBuilder.defaultFailedShort", "The agent was linked, but it could not be set as the bot default"));
|
|
324
325
|
}
|
|
325
|
-
|
|
326
|
+
k(`bots/${g}/agents`);
|
|
326
327
|
return;
|
|
327
328
|
}
|
|
328
|
-
|
|
329
|
+
k(`agents/${e.id}`);
|
|
329
330
|
} catch (e) {
|
|
330
|
-
|
|
331
|
+
O.error(e instanceof Error ? e.message : E("botlit.agentBuilder.saveFailed", "Failed to save agent"));
|
|
331
332
|
}
|
|
332
|
-
},
|
|
333
|
+
}, yt = j ? E("botlit.agentBuilder.save", "Save Changes") : E("botlit.agentBuilder.create", "Create Agent"), bt = (e) => {
|
|
333
334
|
switch (e) {
|
|
334
|
-
case "mcpToolsNeedsServer": return
|
|
335
|
-
case "ragNeedsKnowledgeBase": return
|
|
336
|
-
case "serversNeedMcpTools": return
|
|
337
|
-
case "knowledgeBasesNeedRag": return
|
|
335
|
+
case "mcpToolsNeedsServer": return E("botlit.agentBuilder.warnings.mcpToolsNeedsServer", "MCP Tools is on but no MCP server is attached, so the agent has no tools. Attach a server on the Tools & Knowledge tab or turn it off.");
|
|
336
|
+
case "ragNeedsKnowledgeBase": return E("botlit.agentBuilder.warnings.ragNeedsKnowledgeBase", "RAG is on but no knowledge base is attached, so nothing is retrieved. Attach a knowledge base or turn it off.");
|
|
337
|
+
case "serversNeedMcpTools": return E("botlit.agentBuilder.warnings.serversNeedMcpTools", "MCP servers are attached but MCP Tools is off, so the agent ignores them. Turn MCP Tools on or detach the servers.");
|
|
338
|
+
case "knowledgeBasesNeedRag": return E("botlit.agentBuilder.warnings.knowledgeBasesNeedRag", "Knowledge bases are attached but RAG is off, so the agent ignores them. Turn RAG on or detach them.");
|
|
338
339
|
}
|
|
339
|
-
},
|
|
340
|
+
}, xt = {
|
|
340
341
|
MCP_TOOLS: {
|
|
341
|
-
label:
|
|
342
|
-
description:
|
|
342
|
+
label: E("botlit.agentBuilder.capabilities.mcpTools", "MCP Tools"),
|
|
343
|
+
description: E("botlit.agentBuilder.capabilities.mcpToolsDescription", "Let the agent call the tools of the MCP servers attached below.")
|
|
343
344
|
},
|
|
344
345
|
RAG: {
|
|
345
|
-
label:
|
|
346
|
-
description:
|
|
346
|
+
label: E("botlit.agentBuilder.capabilities.rag", "RAG"),
|
|
347
|
+
description: E("botlit.agentBuilder.capabilities.ragDescription", "Answer from the knowledge bases attached below (retrieval-augmented generation).")
|
|
347
348
|
},
|
|
348
349
|
A2A: {
|
|
349
|
-
label:
|
|
350
|
-
description:
|
|
350
|
+
label: E("botlit.agentBuilder.capabilities.a2a", "Agent delegation"),
|
|
351
|
+
description: E("botlit.agentBuilder.capabilities.a2aDescription", "Let the agent hand sub-tasks to other agents it is connected to.")
|
|
351
352
|
}
|
|
352
|
-
},
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
-
title:
|
|
355
|
-
leading: /* @__PURE__ */
|
|
353
|
+
}, St = F.capabilities.filter((e) => !he.includes(e)), Ct = new Set(G.map((e) => e.id)), wt = new Set(lt.map((e) => e.id)), Tt = F.knowledgeBaseIds.filter((e) => !Ct.has(e)), $ = G.filter((e) => F.knowledgeBaseIds.includes(e.id) && e.indexStatus !== "READY"), Et = F.mcpConnectionIds.filter((e) => !wt.has(e)), Dt = F.llmModelId !== "" && !H && !U && !W.some((e) => e.id === F.llmModelId);
|
|
354
|
+
return /* @__PURE__ */ T(n, {
|
|
355
|
+
title: j ? E("botlit.agentBuilder.editTitle", "Edit Agent") : E("botlit.agentBuilder.createTitle", "Create New Agent"),
|
|
356
|
+
leading: /* @__PURE__ */ w(c, {
|
|
356
357
|
variant: "ghost",
|
|
357
358
|
size: "icon",
|
|
358
|
-
"aria-label":
|
|
359
|
-
onClick: () =>
|
|
360
|
-
children: /* @__PURE__ */
|
|
359
|
+
"aria-label": E("botlit.agentBuilder.back", "Back"),
|
|
360
|
+
onClick: () => k(P),
|
|
361
|
+
children: /* @__PURE__ */ w(Ee, {
|
|
361
362
|
size: 20,
|
|
362
363
|
"aria-hidden": "true"
|
|
363
364
|
})
|
|
364
365
|
}),
|
|
365
|
-
actions: /* @__PURE__ */
|
|
366
|
+
actions: /* @__PURE__ */ T("div", {
|
|
366
367
|
className: "flex gap-2",
|
|
367
|
-
children: [/* @__PURE__ */
|
|
368
|
+
children: [/* @__PURE__ */ w(c, {
|
|
368
369
|
variant: "outline",
|
|
369
|
-
onClick: () =>
|
|
370
|
-
children:
|
|
371
|
-
}), /* @__PURE__ */
|
|
370
|
+
onClick: () => k(P),
|
|
371
|
+
children: E("botlit.common.cancel", "Cancel")
|
|
372
|
+
}), /* @__PURE__ */ w(c, {
|
|
372
373
|
type: "submit",
|
|
373
374
|
form: "agent-builder-form",
|
|
374
|
-
leftIcon: /* @__PURE__ */
|
|
375
|
-
isLoading:
|
|
376
|
-
children:
|
|
375
|
+
leftIcon: /* @__PURE__ */ w(Oe, { size: 16 }),
|
|
376
|
+
isLoading: z || B && Xe,
|
|
377
|
+
children: yt
|
|
377
378
|
})]
|
|
378
379
|
}),
|
|
379
|
-
children: [!u && !g && /* @__PURE__ */
|
|
380
|
+
children: [!u && !g && /* @__PURE__ */ T("div", {
|
|
380
381
|
className: "mx-auto mb-6 max-w-4xl space-y-6",
|
|
381
|
-
children: [/* @__PURE__ */
|
|
382
|
+
children: [/* @__PURE__ */ w(ce, {
|
|
382
383
|
scope: "AGENTS",
|
|
383
384
|
onCreated: (e) => {
|
|
384
385
|
let t = e.agents[0];
|
|
385
|
-
|
|
386
|
+
k(e.agents.length === 1 && t ? `agents/${t.id}` : "agents");
|
|
386
387
|
}
|
|
387
|
-
}), /* @__PURE__ */
|
|
388
|
+
}), /* @__PURE__ */ w(se, {
|
|
388
389
|
kind: "agent",
|
|
389
|
-
onCreated: (e) =>
|
|
390
|
+
onCreated: (e) => k(`agents/${e}`)
|
|
390
391
|
})]
|
|
391
|
-
}), /* @__PURE__ */
|
|
392
|
+
}), /* @__PURE__ */ T("form", {
|
|
392
393
|
id: "agent-builder-form",
|
|
393
|
-
onSubmit: (e) => void
|
|
394
|
+
onSubmit: (e) => void vt(e),
|
|
394
395
|
noValidate: !0,
|
|
395
396
|
className: "max-w-4xl mx-auto",
|
|
396
397
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ w(we, {
|
|
398
399
|
className: "mb-6",
|
|
399
|
-
icon: /* @__PURE__ */
|
|
400
|
-
children:
|
|
400
|
+
icon: /* @__PURE__ */ w(Ae, { size: 18 }),
|
|
401
|
+
children: E("botlit.agentBuilder.purpose", "This guided builder walks you through everything an agent needs: its identity and system prompt, the model and settings it runs on, and the tools and knowledge it can reach. Work through the steps, then save the agent and test it in chat. You can come back and edit any step later.")
|
|
401
402
|
}),
|
|
402
|
-
|
|
403
|
+
B && R && /* @__PURE__ */ w("div", {
|
|
403
404
|
role: "alert",
|
|
404
405
|
className: "mb-4",
|
|
405
|
-
children: /* @__PURE__ */
|
|
406
|
-
resource:
|
|
407
|
-
error:
|
|
408
|
-
onRetry: () => void
|
|
406
|
+
children: /* @__PURE__ */ w(p, {
|
|
407
|
+
resource: E("botlit.agentBuilder.botResource", "this bot"),
|
|
408
|
+
error: R,
|
|
409
|
+
onRetry: () => void Ze()
|
|
409
410
|
})
|
|
410
411
|
}),
|
|
411
|
-
!
|
|
412
|
+
!A && /* @__PURE__ */ w("p", {
|
|
412
413
|
role: "status",
|
|
413
414
|
className: "mb-4 text-sm text-text-secondary",
|
|
414
|
-
children:
|
|
415
|
+
children: E("botlit.agentBuilder.noWorkspace", "No workspace is selected yet. Wait for it to load, or pick a workspace, then save again.")
|
|
415
416
|
}),
|
|
416
|
-
|
|
417
|
+
L && pt > 0 && /* @__PURE__ */ T("div", {
|
|
417
418
|
role: "alert",
|
|
418
419
|
className: "mb-4 flex items-start gap-2 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-text-primary",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ w(D, {
|
|
420
421
|
size: 16,
|
|
421
422
|
className: "mt-0.5 text-status-error-text",
|
|
422
423
|
"aria-hidden": "true"
|
|
423
|
-
}), /* @__PURE__ */
|
|
424
|
+
}), /* @__PURE__ */ w("p", { children: E("botlit.agentBuilder.errorSummary", "Fix the highlighted fields before saving. Tabs with a problem are marked.") })]
|
|
424
425
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ w("div", {
|
|
426
427
|
role: "tablist",
|
|
427
|
-
"aria-label":
|
|
428
|
+
"aria-label": E("botlit.agentBuilder.stepsLabel", "Agent setup steps"),
|
|
428
429
|
className: "mb-8 flex flex-wrap items-center gap-2",
|
|
429
|
-
children:
|
|
430
|
-
let n =
|
|
431
|
-
return /* @__PURE__ */
|
|
430
|
+
children: _t.map((e, t) => {
|
|
431
|
+
let n = I === e.id, r = mt(e.id);
|
|
432
|
+
return /* @__PURE__ */ T("button", {
|
|
432
433
|
ref: (t) => {
|
|
433
|
-
|
|
434
|
+
He.current[e.id] = t;
|
|
434
435
|
},
|
|
435
436
|
type: "button",
|
|
436
437
|
role: "tab",
|
|
@@ -438,162 +439,162 @@ var Pe = [
|
|
|
438
439
|
"aria-selected": n,
|
|
439
440
|
"aria-controls": `agent-panel-${e.id}`,
|
|
440
441
|
tabIndex: n ? 0 : -1,
|
|
441
|
-
onClick: () =>
|
|
442
|
-
onKeyDown: (e) =>
|
|
443
|
-
className:
|
|
442
|
+
onClick: () => Be(e.id),
|
|
443
|
+
onKeyDown: (e) => gt(e, t),
|
|
444
|
+
className: ye("flex items-center gap-2 rounded-lg px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary", n ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-accent", r && "ring-2 ring-status-error-border"),
|
|
444
445
|
children: [
|
|
445
446
|
e.icon,
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ w("span", {
|
|
447
448
|
className: "font-medium",
|
|
448
449
|
children: e.label
|
|
449
450
|
}),
|
|
450
|
-
r && /* @__PURE__ */
|
|
451
|
+
r && /* @__PURE__ */ T("span", {
|
|
451
452
|
className: "text-status-error-text",
|
|
452
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ w(D, {
|
|
453
454
|
size: 14,
|
|
454
455
|
"aria-hidden": "true"
|
|
455
|
-
}), /* @__PURE__ */
|
|
456
|
+
}), /* @__PURE__ */ w("span", {
|
|
456
457
|
className: "sr-only",
|
|
457
|
-
children:
|
|
458
|
+
children: E("botlit.agentBuilder.tabHasProblem", "This step has a problem")
|
|
458
459
|
})]
|
|
459
460
|
})
|
|
460
461
|
]
|
|
461
462
|
}, e.id);
|
|
462
463
|
})
|
|
463
464
|
}),
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ T("div", {
|
|
465
466
|
className: "space-y-6",
|
|
466
467
|
children: [
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ w("div", {
|
|
468
469
|
role: "tabpanel",
|
|
469
470
|
id: "agent-panel-basics",
|
|
470
471
|
"aria-labelledby": "agent-tab-basics",
|
|
471
|
-
hidden:
|
|
472
|
-
children: /* @__PURE__ */
|
|
472
|
+
hidden: I !== "basics",
|
|
473
|
+
children: /* @__PURE__ */ T(r, {
|
|
473
474
|
treatment: "glass",
|
|
474
475
|
glow: !0,
|
|
475
|
-
children: [/* @__PURE__ */
|
|
476
|
+
children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ w(s, { children: E("botlit.agentBuilder.basics.title", "Basic Information") }), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.basics.description", "Set up the agent's identity and purpose") })] }), /* @__PURE__ */ T(i, {
|
|
476
477
|
className: "space-y-6",
|
|
477
478
|
children: [
|
|
478
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
479
480
|
className: "mb-2 text-sm font-medium",
|
|
480
|
-
children:
|
|
481
|
-
}), /* @__PURE__ */
|
|
482
|
-
value:
|
|
483
|
-
onChange: (e) =>
|
|
484
|
-
choices:
|
|
485
|
-
groupLabel:
|
|
486
|
-
optionLabel: (e) =>
|
|
487
|
-
currentLabel:
|
|
481
|
+
children: E("botlit.agentBuilder.avatar", "Avatar")
|
|
482
|
+
}), /* @__PURE__ */ w(l, {
|
|
483
|
+
value: F.avatar,
|
|
484
|
+
onChange: (e) => J("avatar", e),
|
|
485
|
+
choices: Pe,
|
|
486
|
+
groupLabel: E("botlit.agentBuilder.avatar", "Avatar"),
|
|
487
|
+
optionLabel: (e) => E(`botlit.agentBuilder.avatars.${e.key}`, e.label),
|
|
488
|
+
currentLabel: E("botlit.agentBuilder.avatars.current", "Current avatar")
|
|
488
489
|
})] }),
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
label:
|
|
490
|
+
/* @__PURE__ */ w(m, {
|
|
491
|
+
label: E("botlit.agentBuilder.name", "Agent Name"),
|
|
491
492
|
required: !0,
|
|
492
|
-
htmlFor:
|
|
493
|
-
error:
|
|
494
|
-
children: /* @__PURE__ */
|
|
495
|
-
id:
|
|
493
|
+
htmlFor: Z("name"),
|
|
494
|
+
error: X("name"),
|
|
495
|
+
children: /* @__PURE__ */ w(h, {
|
|
496
|
+
id: Z("name"),
|
|
496
497
|
required: !0,
|
|
497
|
-
"aria-invalid":
|
|
498
|
-
"aria-describedby":
|
|
498
|
+
"aria-invalid": X("name") ? !0 : void 0,
|
|
499
|
+
"aria-describedby": X("name") ? `${Z("name")}-error` : void 0,
|
|
499
500
|
maxLength: 120,
|
|
500
|
-
placeholder:
|
|
501
|
-
value:
|
|
502
|
-
onChange: (e) =>
|
|
501
|
+
placeholder: E("botlit.agentBuilder.namePlaceholder", "e.g., Customer Support Agent"),
|
|
502
|
+
value: F.name,
|
|
503
|
+
onChange: (e) => J("name", e.target.value)
|
|
503
504
|
})
|
|
504
505
|
}),
|
|
505
|
-
/* @__PURE__ */
|
|
506
|
-
label:
|
|
507
|
-
htmlFor:
|
|
508
|
-
error:
|
|
509
|
-
description:
|
|
510
|
-
children: /* @__PURE__ */
|
|
511
|
-
id:
|
|
512
|
-
"aria-invalid":
|
|
513
|
-
"aria-describedby":
|
|
506
|
+
/* @__PURE__ */ w(m, {
|
|
507
|
+
label: E("botlit.agentBuilder.slug", "Slug"),
|
|
508
|
+
htmlFor: Z("slug"),
|
|
509
|
+
error: X("slug"),
|
|
510
|
+
description: F.slug.trim() === "" && xe(F.name) !== "" ? E("botlit.agentBuilder.slugDerived", "Will be saved as \"{{slug}}\".", { slug: xe(F.name) }) : E("botlit.agentBuilder.slugHelp", "URL-friendly identifier. Leave empty to build it from the name."),
|
|
511
|
+
children: /* @__PURE__ */ w(h, {
|
|
512
|
+
id: Z("slug"),
|
|
513
|
+
"aria-invalid": X("slug") ? !0 : void 0,
|
|
514
|
+
"aria-describedby": X("slug") ? `${Z("slug")}-error` : `${Z("slug")}-description`,
|
|
514
515
|
placeholder: "customer-support-agent",
|
|
515
|
-
value:
|
|
516
|
-
onChange: (e) =>
|
|
516
|
+
value: F.slug,
|
|
517
|
+
onChange: (e) => J("slug", e.target.value)
|
|
517
518
|
})
|
|
518
519
|
}),
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
label:
|
|
521
|
-
htmlFor:
|
|
522
|
-
children: /* @__PURE__ */
|
|
523
|
-
id:
|
|
524
|
-
placeholder:
|
|
525
|
-
value:
|
|
526
|
-
onChange: (e) =>
|
|
520
|
+
/* @__PURE__ */ w(m, {
|
|
521
|
+
label: E("botlit.agentBuilder.descriptionLabel", "Description"),
|
|
522
|
+
htmlFor: Z("description"),
|
|
523
|
+
children: /* @__PURE__ */ w(te, {
|
|
524
|
+
id: Z("description"),
|
|
525
|
+
placeholder: E("botlit.agentBuilder.descriptionPlaceholder", "Describe what this agent does..."),
|
|
526
|
+
value: F.description,
|
|
527
|
+
onChange: (e) => J("description", e.target.value),
|
|
527
528
|
rows: 3
|
|
528
529
|
})
|
|
529
530
|
}),
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
label:
|
|
532
|
-
htmlFor:
|
|
533
|
-
description:
|
|
534
|
-
children: /* @__PURE__ */
|
|
535
|
-
id:
|
|
536
|
-
"aria-describedby": `${
|
|
537
|
-
className:
|
|
538
|
-
value:
|
|
539
|
-
onChange: (e) =>
|
|
531
|
+
/* @__PURE__ */ w(m, {
|
|
532
|
+
label: E("botlit.agentBuilder.visibilityLabel", "Visibility"),
|
|
533
|
+
htmlFor: Z("visibility"),
|
|
534
|
+
description: E("botlit.agentBuilder.visibilityHelp", "Private: only you. Workspace: everyone in this workspace. Public: shareable outside it."),
|
|
535
|
+
children: /* @__PURE__ */ T(Te, {
|
|
536
|
+
id: Z("visibility"),
|
|
537
|
+
"aria-describedby": `${Z("visibility")}-description`,
|
|
538
|
+
className: Le,
|
|
539
|
+
value: F.visibility,
|
|
540
|
+
onChange: (e) => J("visibility", S(e.target.value, Ie, "PRIVATE")),
|
|
540
541
|
children: [
|
|
541
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ w("option", {
|
|
542
543
|
value: "PRIVATE",
|
|
543
|
-
children:
|
|
544
|
+
children: E("botlit.agentBuilder.visibility.private", "Private")
|
|
544
545
|
}),
|
|
545
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ w("option", {
|
|
546
547
|
value: "WORKSPACE",
|
|
547
|
-
children:
|
|
548
|
+
children: E("botlit.agentBuilder.visibility.workspace", "Workspace")
|
|
548
549
|
}),
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ w("option", {
|
|
550
551
|
value: "PUBLIC",
|
|
551
|
-
children:
|
|
552
|
+
children: E("botlit.agentBuilder.visibility.public", "Public")
|
|
552
553
|
})
|
|
553
554
|
]
|
|
554
555
|
})
|
|
555
556
|
}),
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ T("fieldset", { children: [
|
|
558
|
+
/* @__PURE__ */ w("legend", {
|
|
558
559
|
className: "mb-1 text-sm font-medium",
|
|
559
|
-
children:
|
|
560
|
+
children: E("botlit.agentBuilder.capabilitiesLabel", "Capabilities")
|
|
560
561
|
}),
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
+
/* @__PURE__ */ w("p", {
|
|
562
563
|
className: "mb-3 text-xs text-text-secondary",
|
|
563
|
-
children:
|
|
564
|
+
children: E("botlit.agentBuilder.capabilitiesHelp", "Capabilities are off until you turn them on. Each one only does something once what it needs is attached on the Tools & Knowledge tab.")
|
|
564
565
|
}),
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ w("div", {
|
|
566
567
|
className: "grid grid-cols-1 gap-3 md:grid-cols-3",
|
|
567
|
-
children:
|
|
568
|
+
children: he.map((e) => /* @__PURE__ */ T("label", {
|
|
568
569
|
className: "flex cursor-pointer items-start gap-3 rounded-lg border border-border-subtle p-3 hover:bg-accent",
|
|
569
|
-
children: [/* @__PURE__ */
|
|
570
|
+
children: [/* @__PURE__ */ w("input", {
|
|
570
571
|
type: "checkbox",
|
|
571
572
|
className: "mt-0.5 h-4 w-4 rounded border-border-default",
|
|
572
|
-
checked:
|
|
573
|
-
onChange: () =>
|
|
574
|
-
}), /* @__PURE__ */
|
|
573
|
+
checked: F.capabilities.includes(e),
|
|
574
|
+
onChange: () => Y("capabilities", e)
|
|
575
|
+
}), /* @__PURE__ */ T("span", { children: [/* @__PURE__ */ w("span", {
|
|
575
576
|
className: "block text-sm font-medium",
|
|
576
|
-
children:
|
|
577
|
-
}), /* @__PURE__ */
|
|
577
|
+
children: xt[e].label
|
|
578
|
+
}), /* @__PURE__ */ w("span", {
|
|
578
579
|
className: "block text-xs text-text-secondary",
|
|
579
|
-
children:
|
|
580
|
+
children: xt[e].description
|
|
580
581
|
})] })]
|
|
581
582
|
}, e))
|
|
582
583
|
}),
|
|
583
|
-
|
|
584
|
+
St.length > 0 && /* @__PURE__ */ w("p", {
|
|
584
585
|
className: "mt-3 text-xs text-text-secondary",
|
|
585
|
-
children:
|
|
586
|
+
children: E("botlit.agentBuilder.unusedCapabilities", "This agent also carries {{names}}. They are kept as saved but have no effect yet.", { names: St.join(", ") })
|
|
586
587
|
}),
|
|
587
|
-
|
|
588
|
+
q.length > 0 && /* @__PURE__ */ w("ul", {
|
|
588
589
|
role: "status",
|
|
589
590
|
className: "mt-3 space-y-1 text-sm text-status-warning-text",
|
|
590
|
-
children:
|
|
591
|
+
children: q.map((e) => /* @__PURE__ */ T("li", {
|
|
591
592
|
className: "flex items-start gap-2",
|
|
592
|
-
children: [/* @__PURE__ */
|
|
593
|
+
children: [/* @__PURE__ */ w(D, {
|
|
593
594
|
size: 14,
|
|
594
595
|
className: "mt-0.5 shrink-0",
|
|
595
596
|
"aria-hidden": "true"
|
|
596
|
-
}),
|
|
597
|
+
}), bt(e)]
|
|
597
598
|
}, e))
|
|
598
599
|
})
|
|
599
600
|
] })
|
|
@@ -601,100 +602,100 @@ var Pe = [
|
|
|
601
602
|
})]
|
|
602
603
|
})
|
|
603
604
|
}),
|
|
604
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ w("div", {
|
|
605
606
|
role: "tabpanel",
|
|
606
607
|
id: "agent-panel-prompt",
|
|
607
608
|
"aria-labelledby": "agent-tab-prompt",
|
|
608
|
-
hidden:
|
|
609
|
-
children: /* @__PURE__ */
|
|
609
|
+
hidden: I !== "prompt",
|
|
610
|
+
children: /* @__PURE__ */ T(r, {
|
|
610
611
|
treatment: "glass",
|
|
611
612
|
glow: !0,
|
|
612
|
-
children: [/* @__PURE__ */
|
|
613
|
+
children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ w(s, { children: E("botlit.agentBuilder.prompt.title", "Prompt Configuration") }), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.prompt.description", "Define how the agent communicates and behaves") })] }), /* @__PURE__ */ T(i, {
|
|
613
614
|
className: "space-y-6",
|
|
614
|
-
children: [/* @__PURE__ */
|
|
615
|
-
label:
|
|
615
|
+
children: [/* @__PURE__ */ w(m, {
|
|
616
|
+
label: E("botlit.agentBuilder.systemPrompt", "System Prompt"),
|
|
616
617
|
required: !0,
|
|
617
|
-
htmlFor:
|
|
618
|
-
error:
|
|
619
|
-
description:
|
|
620
|
-
children: /* @__PURE__ */
|
|
621
|
-
id:
|
|
618
|
+
htmlFor: Z("prompt"),
|
|
619
|
+
error: X("systemPrompt"),
|
|
620
|
+
description: E("botlit.agentBuilder.systemPromptHelp", "The core instructions that define the agent's behavior"),
|
|
621
|
+
children: /* @__PURE__ */ w(te, {
|
|
622
|
+
id: Z("prompt"),
|
|
622
623
|
required: !0,
|
|
623
|
-
"aria-invalid":
|
|
624
|
-
"aria-describedby":
|
|
625
|
-
placeholder:
|
|
626
|
-
value:
|
|
627
|
-
onChange: (e) =>
|
|
624
|
+
"aria-invalid": X("systemPrompt") ? !0 : void 0,
|
|
625
|
+
"aria-describedby": X("systemPrompt") ? `${Z("prompt")}-error` : `${Z("prompt")}-description`,
|
|
626
|
+
placeholder: E("botlit.agentBuilder.systemPromptPlaceholder", "You are a helpful assistant..."),
|
|
627
|
+
value: F.systemPrompt,
|
|
628
|
+
onChange: (e) => J("systemPrompt", e.target.value),
|
|
628
629
|
rows: 8,
|
|
629
630
|
className: "font-mono text-sm"
|
|
630
631
|
})
|
|
631
|
-
}), /* @__PURE__ */
|
|
632
|
+
}), /* @__PURE__ */ T("div", {
|
|
632
633
|
className: "grid grid-cols-1 gap-4 md:grid-cols-3",
|
|
633
634
|
children: [
|
|
634
|
-
/* @__PURE__ */
|
|
635
|
-
label:
|
|
636
|
-
htmlFor:
|
|
637
|
-
error:
|
|
638
|
-
description:
|
|
639
|
-
min:
|
|
640
|
-
max:
|
|
635
|
+
/* @__PURE__ */ w(m, {
|
|
636
|
+
label: E("botlit.agentBuilder.temperature", "Temperature"),
|
|
637
|
+
htmlFor: Z("temperature"),
|
|
638
|
+
error: X("temperature"),
|
|
639
|
+
description: E("botlit.agentBuilder.temperatureHelp", "Randomness, {{min}} to {{max}}. 0 is the most predictable. Empty uses {{default}}.", {
|
|
640
|
+
min: b.min,
|
|
641
|
+
max: b.max,
|
|
641
642
|
default: _.temperature
|
|
642
643
|
}),
|
|
643
|
-
children: /* @__PURE__ */
|
|
644
|
-
id:
|
|
644
|
+
children: /* @__PURE__ */ w(h, {
|
|
645
|
+
id: Z("temperature"),
|
|
645
646
|
type: "number",
|
|
646
647
|
step: "0.1",
|
|
647
|
-
min:
|
|
648
|
-
max:
|
|
648
|
+
min: b.min,
|
|
649
|
+
max: b.max,
|
|
649
650
|
placeholder: String(_.temperature),
|
|
650
|
-
"aria-invalid":
|
|
651
|
-
"aria-describedby":
|
|
652
|
-
value:
|
|
653
|
-
onChange: (e) =>
|
|
651
|
+
"aria-invalid": X("temperature") ? !0 : void 0,
|
|
652
|
+
"aria-describedby": X("temperature") ? `${Z("temperature")}-error` : `${Z("temperature")}-description`,
|
|
653
|
+
value: F.temperature,
|
|
654
|
+
onChange: (e) => J("temperature", e.target.value)
|
|
654
655
|
})
|
|
655
656
|
}),
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
label:
|
|
658
|
-
htmlFor:
|
|
659
|
-
error:
|
|
660
|
-
description:
|
|
661
|
-
min:
|
|
662
|
-
max:
|
|
657
|
+
/* @__PURE__ */ w(m, {
|
|
658
|
+
label: E("botlit.agentBuilder.maxTokens", "Max Tokens"),
|
|
659
|
+
htmlFor: Z("max-tokens"),
|
|
660
|
+
error: X("maxTokens"),
|
|
661
|
+
description: E("botlit.agentBuilder.maxTokensHelp", "Maximum response length, {{min}} to {{max}}. Empty uses {{default}}.", {
|
|
662
|
+
min: y.min,
|
|
663
|
+
max: y.max,
|
|
663
664
|
default: _.maxTokens
|
|
664
665
|
}),
|
|
665
|
-
children: /* @__PURE__ */
|
|
666
|
-
id:
|
|
666
|
+
children: /* @__PURE__ */ w(h, {
|
|
667
|
+
id: Z("max-tokens"),
|
|
667
668
|
type: "number",
|
|
668
669
|
step: "1",
|
|
669
|
-
min:
|
|
670
|
-
max:
|
|
670
|
+
min: y.min,
|
|
671
|
+
max: y.max,
|
|
671
672
|
placeholder: String(_.maxTokens),
|
|
672
|
-
"aria-invalid":
|
|
673
|
-
"aria-describedby":
|
|
674
|
-
value:
|
|
675
|
-
onChange: (e) =>
|
|
673
|
+
"aria-invalid": X("maxTokens") ? !0 : void 0,
|
|
674
|
+
"aria-describedby": X("maxTokens") ? `${Z("max-tokens")}-error` : `${Z("max-tokens")}-description`,
|
|
675
|
+
value: F.maxTokens,
|
|
676
|
+
onChange: (e) => J("maxTokens", e.target.value)
|
|
676
677
|
})
|
|
677
678
|
}),
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
label:
|
|
680
|
-
htmlFor:
|
|
681
|
-
error:
|
|
682
|
-
description:
|
|
683
|
-
min:
|
|
684
|
-
max:
|
|
679
|
+
/* @__PURE__ */ w(m, {
|
|
680
|
+
label: E("botlit.agentBuilder.maxConcurrent", "Max Concurrent Runs"),
|
|
681
|
+
htmlFor: Z("max-concurrent"),
|
|
682
|
+
error: X("maxConcurrentExecutions"),
|
|
683
|
+
description: E("botlit.agentBuilder.maxConcurrentHelp", "How many runs can happen at once, {{min}} to {{max}}. Empty uses {{default}}.", {
|
|
684
|
+
min: v.min,
|
|
685
|
+
max: v.max,
|
|
685
686
|
default: _.maxConcurrentExecutions
|
|
686
687
|
}),
|
|
687
|
-
children: /* @__PURE__ */
|
|
688
|
-
id:
|
|
688
|
+
children: /* @__PURE__ */ w(h, {
|
|
689
|
+
id: Z("max-concurrent"),
|
|
689
690
|
type: "number",
|
|
690
691
|
step: "1",
|
|
691
|
-
min:
|
|
692
|
-
max:
|
|
692
|
+
min: v.min,
|
|
693
|
+
max: v.max,
|
|
693
694
|
placeholder: String(_.maxConcurrentExecutions),
|
|
694
|
-
"aria-invalid":
|
|
695
|
-
"aria-describedby":
|
|
696
|
-
value:
|
|
697
|
-
onChange: (e) =>
|
|
695
|
+
"aria-invalid": X("maxConcurrentExecutions") ? !0 : void 0,
|
|
696
|
+
"aria-describedby": X("maxConcurrentExecutions") ? `${Z("max-concurrent")}-error` : `${Z("max-concurrent")}-description`,
|
|
697
|
+
value: F.maxConcurrentExecutions,
|
|
698
|
+
onChange: (e) => J("maxConcurrentExecutions", e.target.value)
|
|
698
699
|
})
|
|
699
700
|
})
|
|
700
701
|
]
|
|
@@ -702,54 +703,54 @@ var Pe = [
|
|
|
702
703
|
})]
|
|
703
704
|
})
|
|
704
705
|
}),
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
+
/* @__PURE__ */ w("div", {
|
|
706
707
|
role: "tabpanel",
|
|
707
708
|
id: "agent-panel-model",
|
|
708
709
|
"aria-labelledby": "agent-tab-model",
|
|
709
|
-
hidden:
|
|
710
|
-
children: /* @__PURE__ */
|
|
710
|
+
hidden: I !== "model",
|
|
711
|
+
children: /* @__PURE__ */ T(r, {
|
|
711
712
|
treatment: "glass",
|
|
712
713
|
glow: !0,
|
|
713
|
-
children: [/* @__PURE__ */
|
|
714
|
+
children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ w(s, { children: E("botlit.agentBuilder.model.title", "LLM Configuration") }), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.model.description", "Select the LLM model for this agent") })] }), /* @__PURE__ */ T(i, {
|
|
714
715
|
className: "space-y-6",
|
|
715
716
|
children: [
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
label:
|
|
718
|
-
htmlFor:
|
|
719
|
-
description:
|
|
717
|
+
/* @__PURE__ */ T(m, {
|
|
718
|
+
label: E("botlit.agentBuilder.model.label", "LLM Model"),
|
|
719
|
+
htmlFor: Z("model"),
|
|
720
|
+
description: E("botlit.agentBuilder.model.help", "An agent needs a model before it can go live. You can save it as a draft without one and test it in chat once a model is set."),
|
|
720
721
|
children: [
|
|
721
|
-
|
|
722
|
+
H && /* @__PURE__ */ w("p", {
|
|
722
723
|
role: "status",
|
|
723
|
-
children:
|
|
724
|
+
children: E("botlit.agentBuilder.model.loading", "Loading answer models…")
|
|
724
725
|
}),
|
|
725
|
-
|
|
726
|
+
U && /* @__PURE__ */ T("div", {
|
|
726
727
|
role: "alert",
|
|
727
|
-
children: [/* @__PURE__ */
|
|
728
|
+
children: [/* @__PURE__ */ w("p", { children: E("botlit.agentBuilder.model.loadFailed", "Could not load answer models.") }), /* @__PURE__ */ w(c, {
|
|
728
729
|
type: "button",
|
|
729
730
|
variant: "secondary",
|
|
730
731
|
onClick: () => {
|
|
731
|
-
|
|
732
|
+
at(), tt();
|
|
732
733
|
},
|
|
733
|
-
children:
|
|
734
|
+
children: E("botlit.agentBuilder.model.retry", "Retry model catalog")
|
|
734
735
|
})]
|
|
735
736
|
}),
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
id:
|
|
738
|
-
"aria-describedby": `${
|
|
739
|
-
disabled:
|
|
740
|
-
className:
|
|
741
|
-
value:
|
|
742
|
-
onChange: (e) =>
|
|
737
|
+
/* @__PURE__ */ T(Te, {
|
|
738
|
+
id: Z("model"),
|
|
739
|
+
"aria-describedby": `${Z("model")}-description`,
|
|
740
|
+
disabled: H || !!U,
|
|
741
|
+
className: Le,
|
|
742
|
+
value: F.llmModelId,
|
|
743
|
+
onChange: (e) => J("llmModelId", e.target.value),
|
|
743
744
|
children: [
|
|
744
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ w("option", {
|
|
745
746
|
value: "",
|
|
746
|
-
children:
|
|
747
|
+
children: E("botlit.agentBuilder.model.none", "Select a model...")
|
|
747
748
|
}),
|
|
748
|
-
|
|
749
|
-
value:
|
|
750
|
-
children:
|
|
749
|
+
Dt && /* @__PURE__ */ w("option", {
|
|
750
|
+
value: F.llmModelId,
|
|
751
|
+
children: E("botlit.agentBuilder.model.unavailable", "Unavailable model ({{id}})", { id: F.llmModelId })
|
|
751
752
|
}),
|
|
752
|
-
|
|
753
|
+
W.map((e) => /* @__PURE__ */ T("option", {
|
|
753
754
|
value: e.id,
|
|
754
755
|
children: [
|
|
755
756
|
e.name,
|
|
@@ -762,46 +763,46 @@ var Pe = [
|
|
|
762
763
|
})
|
|
763
764
|
]
|
|
764
765
|
}),
|
|
765
|
-
!
|
|
766
|
-
idPrefix:
|
|
767
|
-
value:
|
|
768
|
-
onChange: (e) =>
|
|
769
|
-
primaryModelId:
|
|
770
|
-
models:
|
|
766
|
+
!H && !U && /* @__PURE__ */ w(d, {
|
|
767
|
+
idPrefix: Z("model"),
|
|
768
|
+
value: F.fallbackModelIds,
|
|
769
|
+
onChange: (e) => J("fallbackModelIds", e),
|
|
770
|
+
primaryModelId: F.llmModelId,
|
|
771
|
+
models: W.map((e) => ({
|
|
771
772
|
id: e.id,
|
|
772
773
|
name: e.name,
|
|
773
774
|
modelId: e.modelId,
|
|
774
|
-
providerName:
|
|
775
|
+
providerName: V?.find((t) => t.id === e.providerId)?.name
|
|
775
776
|
}))
|
|
776
777
|
}),
|
|
777
|
-
|
|
778
|
+
ht && !H && !U && /* @__PURE__ */ T("div", {
|
|
778
779
|
role: "status",
|
|
779
780
|
className: "flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm",
|
|
780
|
-
children: [/* @__PURE__ */
|
|
781
|
+
children: [/* @__PURE__ */ w(D, {
|
|
781
782
|
size: 16,
|
|
782
783
|
className: "mt-0.5 shrink-0 text-status-warning-text",
|
|
783
784
|
"aria-hidden": "true"
|
|
784
|
-
}), /* @__PURE__ */
|
|
785
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", { children: W.length === 0 ? E("botlit.agentBuilder.model.noneConfigured", "No provider or model is configured in this workspace yet, so this agent cannot go live. Add a provider and a model in Settings first.") : E("botlit.agentBuilder.model.noneChosen", "No model is chosen. The agent can be saved as a draft, but it cannot go live until it has one.") }), W.length === 0 && /* @__PURE__ */ w(c, {
|
|
785
786
|
type: "button",
|
|
786
787
|
variant: "ghost",
|
|
787
788
|
className: "px-0",
|
|
788
|
-
onClick: () =>
|
|
789
|
-
children:
|
|
789
|
+
onClick: () => k("settings"),
|
|
790
|
+
children: E("botlit.agentBuilder.model.openSettings", "Open Settings")
|
|
790
791
|
})] })]
|
|
791
792
|
}),
|
|
792
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ T("div", {
|
|
793
794
|
className: "rounded-lg bg-bg-sunken p-4",
|
|
794
|
-
children: [/* @__PURE__ */
|
|
795
|
+
children: [/* @__PURE__ */ w("h4", {
|
|
795
796
|
className: "mb-2 text-sm font-medium",
|
|
796
|
-
children:
|
|
797
|
-
}), /* @__PURE__ */
|
|
797
|
+
children: E("botlit.agentBuilder.model.providers", "Available Providers")
|
|
798
|
+
}), /* @__PURE__ */ T("div", {
|
|
798
799
|
className: "grid grid-cols-2 gap-2",
|
|
799
|
-
children: [
|
|
800
|
+
children: [V?.map((e) => /* @__PURE__ */ T("div", {
|
|
800
801
|
className: "text-sm",
|
|
801
|
-
children: [/* @__PURE__ */
|
|
802
|
+
children: [/* @__PURE__ */ w("span", {
|
|
802
803
|
className: "font-medium",
|
|
803
804
|
children: e.name
|
|
804
|
-
}), /* @__PURE__ */
|
|
805
|
+
}), /* @__PURE__ */ T("span", {
|
|
805
806
|
className: "ml-2 text-text-secondary",
|
|
806
807
|
children: [
|
|
807
808
|
"(",
|
|
@@ -809,9 +810,9 @@ var Pe = [
|
|
|
809
810
|
")"
|
|
810
811
|
]
|
|
811
812
|
})]
|
|
812
|
-
}, e.id)), !
|
|
813
|
+
}, e.id)), !H && !U && !V?.length && /* @__PURE__ */ w("p", {
|
|
813
814
|
className: "text-sm text-text-secondary",
|
|
814
|
-
children:
|
|
815
|
+
children: E("botlit.agentBuilder.model.noProviders", "No providers configured")
|
|
815
816
|
})]
|
|
816
817
|
})]
|
|
817
818
|
})
|
|
@@ -819,89 +820,89 @@ var Pe = [
|
|
|
819
820
|
})]
|
|
820
821
|
})
|
|
821
822
|
}),
|
|
822
|
-
/* @__PURE__ */
|
|
823
|
+
/* @__PURE__ */ w("div", {
|
|
823
824
|
role: "tabpanel",
|
|
824
825
|
id: "agent-panel-tools",
|
|
825
826
|
"aria-labelledby": "agent-tab-tools",
|
|
826
|
-
hidden:
|
|
827
|
-
children: /* @__PURE__ */
|
|
827
|
+
hidden: I !== "tools",
|
|
828
|
+
children: /* @__PURE__ */ T("div", {
|
|
828
829
|
className: "space-y-6",
|
|
829
830
|
children: [
|
|
830
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ T(r, {
|
|
831
832
|
treatment: "glass",
|
|
832
833
|
glow: !0,
|
|
833
|
-
children: [/* @__PURE__ */
|
|
834
|
+
children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ T(s, {
|
|
834
835
|
className: "flex items-center gap-2",
|
|
835
|
-
children: [/* @__PURE__ */
|
|
836
|
+
children: [/* @__PURE__ */ w(je, {
|
|
836
837
|
size: 18,
|
|
837
838
|
"aria-hidden": "true"
|
|
838
|
-
}),
|
|
839
|
-
}), /* @__PURE__ */
|
|
840
|
-
legend:
|
|
841
|
-
items:
|
|
839
|
+
}), E("botlit.agentBuilder.tools.title", "MCP servers")]
|
|
840
|
+
}), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.tools.description", "The tools of the servers you attach are available to the agent when MCP Tools is on.") })] }), /* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(Re, {
|
|
841
|
+
legend: E("botlit.agentBuilder.tools.legend", "MCP servers attached to this agent"),
|
|
842
|
+
items: lt.map((e) => ({
|
|
842
843
|
id: e.id,
|
|
843
844
|
name: e.name,
|
|
844
845
|
detail: e.status
|
|
845
846
|
})),
|
|
846
|
-
selected:
|
|
847
|
-
missing:
|
|
848
|
-
loading:
|
|
849
|
-
error:
|
|
850
|
-
onRetry: () => void
|
|
851
|
-
onToggle: (e) =>
|
|
852
|
-
emptyText:
|
|
853
|
-
resource:
|
|
847
|
+
selected: F.mcpConnectionIds,
|
|
848
|
+
missing: Et,
|
|
849
|
+
loading: ut,
|
|
850
|
+
error: dt,
|
|
851
|
+
onRetry: () => void ft(),
|
|
852
|
+
onToggle: (e) => Y("mcpConnectionIds", e),
|
|
853
|
+
emptyText: E("botlit.agentBuilder.tools.empty", "No MCP servers in this workspace yet. Add one on the MCP Servers page."),
|
|
854
|
+
resource: E("botlit.agentBuilder.tools.resource", "MCP servers")
|
|
854
855
|
}) })]
|
|
855
856
|
}),
|
|
856
|
-
/* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ T(r, {
|
|
857
858
|
treatment: "glass",
|
|
858
859
|
glow: !0,
|
|
859
|
-
children: [/* @__PURE__ */
|
|
860
|
+
children: [/* @__PURE__ */ T(o, { children: [/* @__PURE__ */ T(s, {
|
|
860
861
|
className: "flex items-center gap-2",
|
|
861
|
-
children: [/* @__PURE__ */
|
|
862
|
+
children: [/* @__PURE__ */ w(De, {
|
|
862
863
|
size: 18,
|
|
863
864
|
"aria-hidden": "true"
|
|
864
|
-
}),
|
|
865
|
-
}), /* @__PURE__ */
|
|
866
|
-
legend:
|
|
867
|
-
items:
|
|
865
|
+
}), E("botlit.agentBuilder.knowledge.title", "Knowledge bases")]
|
|
866
|
+
}), /* @__PURE__ */ w(a, { children: E("botlit.agentBuilder.knowledge.description", "The agent answers from the knowledge bases you attach when RAG is on.") })] }), /* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(Re, {
|
|
867
|
+
legend: E("botlit.agentBuilder.knowledge.legend", "Knowledge bases attached to this agent"),
|
|
868
|
+
items: G.map((e) => ({
|
|
868
869
|
id: e.id,
|
|
869
870
|
name: e.name,
|
|
870
871
|
detail: e.indexStatus
|
|
871
872
|
})),
|
|
872
|
-
selected:
|
|
873
|
-
missing:
|
|
874
|
-
loading:
|
|
875
|
-
error:
|
|
876
|
-
onRetry: () => void
|
|
877
|
-
onToggle: (e) =>
|
|
878
|
-
emptyText:
|
|
879
|
-
resource:
|
|
873
|
+
selected: F.knowledgeBaseIds,
|
|
874
|
+
missing: Tt,
|
|
875
|
+
loading: ot,
|
|
876
|
+
error: st,
|
|
877
|
+
onRetry: () => void ct(),
|
|
878
|
+
onToggle: (e) => Y("knowledgeBaseIds", e),
|
|
879
|
+
emptyText: E("botlit.agentBuilder.knowledge.empty", "No knowledge bases in this workspace yet. Create one on the Knowledge Bases page."),
|
|
880
|
+
resource: E("botlit.agentBuilder.knowledge.resource", "knowledge bases")
|
|
880
881
|
}) })]
|
|
881
882
|
}),
|
|
882
|
-
|
|
883
|
+
q.length > 0 && /* @__PURE__ */ w("ul", {
|
|
883
884
|
role: "status",
|
|
884
885
|
className: "space-y-1 text-sm text-status-warning-text",
|
|
885
|
-
children:
|
|
886
|
+
children: q.map((e) => /* @__PURE__ */ T("li", {
|
|
886
887
|
className: "flex items-start gap-2",
|
|
887
|
-
children: [/* @__PURE__ */
|
|
888
|
+
children: [/* @__PURE__ */ w(D, {
|
|
888
889
|
size: 14,
|
|
889
890
|
className: "mt-0.5 shrink-0",
|
|
890
891
|
"aria-hidden": "true"
|
|
891
|
-
}),
|
|
892
|
+
}), bt(e)]
|
|
892
893
|
}, e))
|
|
893
894
|
}),
|
|
894
|
-
|
|
895
|
+
$.length > 0 && /* @__PURE__ */ w("ul", {
|
|
895
896
|
role: "status",
|
|
896
897
|
"data-testid": "builder-knowledge-not-ready",
|
|
897
898
|
className: "space-y-1 text-sm text-status-warning-text",
|
|
898
|
-
children:
|
|
899
|
+
children: $.map((e) => /* @__PURE__ */ T("li", {
|
|
899
900
|
className: "flex items-start gap-2",
|
|
900
|
-
children: [/* @__PURE__ */
|
|
901
|
+
children: [/* @__PURE__ */ w(D, {
|
|
901
902
|
size: 14,
|
|
902
903
|
className: "mt-0.5 shrink-0",
|
|
903
904
|
"aria-hidden": "true"
|
|
904
|
-
}),
|
|
905
|
+
}), E("botlit.agentBuilder.knowledge.notReady", "\"{{name}}\" is {{status}}. An agent with RAG on cannot answer until it is ready.", {
|
|
905
906
|
name: e.name,
|
|
906
907
|
status: e.indexStatus.toLowerCase()
|
|
907
908
|
})]
|
|
@@ -910,23 +911,23 @@ var Pe = [
|
|
|
910
911
|
]
|
|
911
912
|
})
|
|
912
913
|
}),
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ T("div", {
|
|
914
915
|
className: "flex justify-between pt-6",
|
|
915
|
-
children: [/* @__PURE__ */
|
|
916
|
+
children: [/* @__PURE__ */ w(c, {
|
|
916
917
|
type: "button",
|
|
917
918
|
variant: "outline",
|
|
918
|
-
onClick: () =>
|
|
919
|
-
disabled:
|
|
920
|
-
children:
|
|
921
|
-
}),
|
|
919
|
+
onClick: () => Q(M[Math.max(0, M.indexOf(I) - 1)]),
|
|
920
|
+
disabled: I === M[0],
|
|
921
|
+
children: E("botlit.agentBuilder.previous", "Previous")
|
|
922
|
+
}), I === M[M.length - 1] ? /* @__PURE__ */ w(c, {
|
|
922
923
|
type: "submit",
|
|
923
|
-
leftIcon: /* @__PURE__ */
|
|
924
|
-
isLoading:
|
|
925
|
-
children:
|
|
926
|
-
}, "submit") : /* @__PURE__ */
|
|
924
|
+
leftIcon: /* @__PURE__ */ w(Oe, { size: 16 }),
|
|
925
|
+
isLoading: z,
|
|
926
|
+
children: yt
|
|
927
|
+
}, "submit") : /* @__PURE__ */ w(c, {
|
|
927
928
|
type: "button",
|
|
928
|
-
onClick: () =>
|
|
929
|
-
children:
|
|
929
|
+
onClick: () => Q(M[M.indexOf(I) + 1]),
|
|
930
|
+
children: E("botlit.agentBuilder.next", "Next")
|
|
930
931
|
}, "next")]
|
|
931
932
|
})
|
|
932
933
|
]
|
|
@@ -934,56 +935,56 @@ var Pe = [
|
|
|
934
935
|
]
|
|
935
936
|
})]
|
|
936
937
|
});
|
|
937
|
-
},
|
|
938
|
+
}, Re = ({ legend: t, items: n, selected: r, missing: i, loading: a, error: o, onRetry: s, onToggle: c, emptyText: l, resource: u }) => {
|
|
938
939
|
let d = e();
|
|
939
|
-
return a ? /* @__PURE__ */
|
|
940
|
+
return a ? /* @__PURE__ */ w("p", {
|
|
940
941
|
role: "status",
|
|
941
942
|
"aria-busy": "true",
|
|
942
943
|
className: "text-sm text-text-secondary",
|
|
943
944
|
children: d("botlit.agentBuilder.attachments.loading", "Loading {{resource}}…", { resource: u })
|
|
944
|
-
}) : o ? /* @__PURE__ */
|
|
945
|
+
}) : o ? /* @__PURE__ */ w(p, {
|
|
945
946
|
resource: u,
|
|
946
947
|
error: o,
|
|
947
948
|
onRetry: s
|
|
948
|
-
}) : n.length === 0 && i.length === 0 ? /* @__PURE__ */
|
|
949
|
+
}) : n.length === 0 && i.length === 0 ? /* @__PURE__ */ w("p", {
|
|
949
950
|
className: "text-sm text-text-secondary",
|
|
950
951
|
children: l
|
|
951
|
-
}) : /* @__PURE__ */
|
|
952
|
+
}) : /* @__PURE__ */ T("fieldset", { children: [/* @__PURE__ */ w("legend", {
|
|
952
953
|
className: "sr-only",
|
|
953
954
|
children: t
|
|
954
|
-
}), /* @__PURE__ */
|
|
955
|
+
}), /* @__PURE__ */ T("ul", {
|
|
955
956
|
className: "grid grid-cols-1 gap-2 md:grid-cols-2",
|
|
956
|
-
children: [n.map((e) => /* @__PURE__ */
|
|
957
|
+
children: [n.map((e) => /* @__PURE__ */ w("li", { children: /* @__PURE__ */ T("label", {
|
|
957
958
|
className: "flex cursor-pointer items-start gap-3 rounded-lg border border-border-subtle p-3 hover:bg-accent",
|
|
958
|
-
children: [/* @__PURE__ */
|
|
959
|
+
children: [/* @__PURE__ */ w("input", {
|
|
959
960
|
type: "checkbox",
|
|
960
961
|
className: "mt-0.5 h-4 w-4 rounded border-border-default",
|
|
961
962
|
checked: r.includes(e.id),
|
|
962
963
|
onChange: () => c(e.id)
|
|
963
|
-
}), /* @__PURE__ */
|
|
964
|
+
}), /* @__PURE__ */ T("span", { children: [/* @__PURE__ */ w("span", {
|
|
964
965
|
className: "block text-sm font-medium",
|
|
965
966
|
children: e.name
|
|
966
|
-
}), e.detail && /* @__PURE__ */
|
|
967
|
+
}), e.detail && /* @__PURE__ */ w("span", {
|
|
967
968
|
className: "block text-xs text-text-secondary",
|
|
968
969
|
children: e.detail
|
|
969
970
|
})] })]
|
|
970
|
-
}) }, e.id)), i.map((e) => /* @__PURE__ */
|
|
971
|
+
}) }, e.id)), i.map((e) => /* @__PURE__ */ w("li", { children: /* @__PURE__ */ T("label", {
|
|
971
972
|
className: "flex cursor-pointer items-start gap-3 rounded-lg border border-status-warning-border p-3",
|
|
972
|
-
children: [/* @__PURE__ */
|
|
973
|
+
children: [/* @__PURE__ */ w("input", {
|
|
973
974
|
type: "checkbox",
|
|
974
975
|
className: "mt-0.5 h-4 w-4 rounded border-border-default",
|
|
975
976
|
checked: !0,
|
|
976
977
|
onChange: () => c(e)
|
|
977
|
-
}), /* @__PURE__ */
|
|
978
|
-
/* @__PURE__ */
|
|
978
|
+
}), /* @__PURE__ */ T("span", { children: [
|
|
979
|
+
/* @__PURE__ */ w("span", {
|
|
979
980
|
className: "block text-sm font-medium",
|
|
980
981
|
children: d("botlit.agentBuilder.attachments.missing", "No longer available")
|
|
981
982
|
}),
|
|
982
|
-
/* @__PURE__ */
|
|
983
|
+
/* @__PURE__ */ w("span", {
|
|
983
984
|
className: "block font-mono text-xs text-text-secondary",
|
|
984
985
|
children: e
|
|
985
986
|
}),
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
+
/* @__PURE__ */ w("span", {
|
|
987
988
|
className: "block text-xs text-text-secondary",
|
|
988
989
|
children: d("botlit.agentBuilder.attachments.missingHelp", "Untick to remove it from this agent.")
|
|
989
990
|
})
|
|
@@ -991,6 +992,6 @@ var Pe = [
|
|
|
991
992
|
}) }, e))]
|
|
992
993
|
})] });
|
|
993
994
|
};
|
|
994
|
-
export {
|
|
995
|
+
export { N as AgentBuilderPage };
|
|
995
996
|
|
|
996
997
|
//# sourceMappingURL=AgentBuilderPage.js.map
|