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