@burdenoff/microfe-botmanor 2026.1007.1 → 2026.1009.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/botlit/BotlitRoutes.js +58 -146
  2. package/dist/botlit/BotlitRoutes.js.map +1 -1
  3. package/dist/botlit/BotmanorRoot.js.map +1 -1
  4. package/dist/botlit/BotmanorRootInner.js +39 -67
  5. package/dist/botlit/BotmanorRootInner.js.map +1 -1
  6. package/dist/botlit/components/AssistantRuntimeSetupPanel.js +1 -1
  7. package/dist/botlit/components/AssistantRuntimeSetupPanel.js.map +1 -1
  8. package/dist/botlit/components/ModelRegistrationPanel.js +174 -0
  9. package/dist/botlit/components/ModelRegistrationPanel.js.map +1 -0
  10. package/dist/botlit/hooks/internal/workspaceGateway.js +1 -1
  11. package/dist/botlit/hooks/useAssistantRuntimeSetup.js +2 -2
  12. package/dist/botlit/hooks/useAssistantRuntimeSetup.js.map +1 -1
  13. package/dist/botlit/hooks/useBotWorkflow.js +56 -0
  14. package/dist/botlit/hooks/useBotWorkflow.js.map +1 -0
  15. package/dist/botlit/hooks/useLLMProviders.js +94 -50
  16. package/dist/botlit/hooks/useLLMProviders.js.map +1 -1
  17. package/dist/botlit/pages/AgentBuilderPage.js +206 -183
  18. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
  19. package/dist/botlit/pages/BotWorkflowTab.js +33 -33
  20. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
  21. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +162 -145
  22. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
  23. package/dist/botlit/pages/SettingsPage.js +129 -66
  24. package/dist/botlit/pages/SettingsPage.js.map +1 -1
  25. package/dist/botlit/providers/BotlitProvider.js +30 -26
  26. package/dist/botlit/providers/BotlitProvider.js.map +1 -1
  27. package/dist/botlit/utils/embedding-models.js +36 -0
  28. package/dist/botlit/utils/embedding-models.js.map +1 -0
  29. package/dist/generated/wspace-operations.js +58 -36
  30. package/dist/generated/wspace-operations.js.map +1 -1
  31. package/package.json +1 -3
@@ -1,21 +1,22 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
2
  import { useBots as t } from "../hooks/useBots.js";
3
- import { useAgent as n, useCreateAgent as r, useUpdateAgent as i } from "../hooks/useAgents.js";
4
- import { useLLMModels as a, useLLMProviders as o } from "../hooks/useLLMProviders.js";
5
- import { cn as s } from "../utils/cn.js";
6
- import { PageLayout as c } from "../components/PageLayout.js";
7
- import { Card as l, CardContent as u, CardDescription as d, CardHeader as f, CardTitle as p } from "../components/Card.js";
8
- import { Button as m } from "../components/Button.js";
9
- import { FormField as h, Input as g, Textarea as _ } from "../components/Input.js";
10
- import { toUnion as v } from "../utils/unions.js";
11
- import { useEffect as y, useState as b } from "react";
12
- import { PagePurpose as x } from "@burdenoff/fe-libs/ui";
13
- import { jsx as S, jsxs as C } from "react/jsx-runtime";
14
- import { useParams as w } from "react-router";
15
- import { ArrowLeft as T, Brain as E, Save as D, Settings as O, Sparkles as k, Wrench as A } from "lucide-react";
16
- import { toast as j } from "sonner";
3
+ import { useAgent as ee, useCreateAgent as te, useUpdateAgent as ne } from "../hooks/useAgents.js";
4
+ import { useLLMModels as n, useLLMProviders as re } from "../hooks/useLLMProviders.js";
5
+ import { cn as r } from "../utils/cn.js";
6
+ import { PageLayout as i } from "../components/PageLayout.js";
7
+ import { Card as a, CardContent as o, CardDescription as s, CardHeader as c, CardTitle as l } from "../components/Card.js";
8
+ import { Button as u } from "../components/Button.js";
9
+ import { FormField as d, Input as f, Textarea as p } from "../components/Input.js";
10
+ import { toUnion as m } from "../utils/unions.js";
11
+ import { configuredAnswerModels as h } from "../utils/embedding-models.js";
12
+ import { useEffect as g, useState as _ } from "react";
13
+ import { PagePurpose as ie } from "@burdenoff/fe-libs/ui";
14
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
15
+ import { useParams as ae } from "react-router";
16
+ import { ArrowLeft as oe, Brain as se, Save as b, Settings as x, Sparkles as S, Wrench as C } from "lucide-react";
17
+ import { toast as w } from "sonner";
17
18
  //#region src/botlit/pages/AgentBuilderPage.tsx
18
- var M = [
19
+ var T = [
19
20
  "MCP_TOOLS",
20
21
  "RAG",
21
22
  "REASONING",
@@ -24,23 +25,23 @@ var M = [
24
25
  "CODE_EXECUTION",
25
26
  "A2A",
26
27
  "WEB_BROWSING"
27
- ], N = [
28
+ ], E = [
28
29
  "ASSISTANT",
29
30
  "ANALYST",
30
31
  "AUTOMATION",
31
32
  "SPECIALIST"
32
33
  ];
33
- function P(e) {
34
+ function D(e) {
34
35
  return e.flatMap((e) => {
35
- let t = M.find((t) => t === e);
36
+ let t = T.find((t) => t === e);
36
37
  return t ? [t] : [];
37
38
  });
38
39
  }
39
- function F(e) {
40
- return v(e, N, "ASSISTANT");
40
+ function O(e) {
41
+ return m(e, E, "ASSISTANT");
41
42
  }
42
- var I = () => {
43
- let { agentId: v } = w(), { navigateTo: M, workspaceId: N } = e(), { data: I } = n(v), { data: L } = t(), { data: R } = o(), { data: z } = a(), [B, V] = r(), [H, U] = i(), W = !!v, [G, K] = b(0), [q, J] = b({
43
+ var k = () => {
44
+ let { agentId: m } = ae(), { navigateTo: T, workspaceId: E } = e(), { data: k } = ee(m), { data: A } = t(), { data: j, loading: ce, error: M, refetch: N } = re(), { data: P, loading: F, error: I, refetch: L } = n(), R = ce || F, z = M || I, B = h(P ?? [], j ?? []), [V, H] = te(), [U, W] = ne(), G = !!m, [K, q] = _(0), [J, Y] = _({
44
45
  name: "",
45
46
  slug: "",
46
47
  description: "",
@@ -54,10 +55,10 @@ var I = () => {
54
55
  capabilities: ["MCP_TOOLS", "REASONING"],
55
56
  llmModelId: ""
56
57
  });
57
- y(() => {
58
- if (I) {
59
- let e = I;
60
- J({
58
+ g(() => {
59
+ if (k) {
60
+ let e = k;
61
+ Y({
61
62
  name: e.name,
62
63
  slug: e.slug,
63
64
  description: e.description || "",
@@ -72,29 +73,29 @@ var I = () => {
72
73
  llmModelId: e.llmModelId || ""
73
74
  });
74
75
  }
75
- }, [I]);
76
- let Y = [
76
+ }, [k]);
77
+ let X = [
77
78
  {
78
79
  id: 0,
79
80
  label: "Basic Info",
80
- icon: /* @__PURE__ */ S(k, { size: 18 })
81
+ icon: /* @__PURE__ */ v(S, { size: 18 })
81
82
  },
82
83
  {
83
84
  id: 1,
84
85
  label: "Prompt",
85
- icon: /* @__PURE__ */ S(E, { size: 18 })
86
+ icon: /* @__PURE__ */ v(se, { size: 18 })
86
87
  },
87
88
  {
88
89
  id: 2,
89
90
  label: "LLM Model",
90
- icon: /* @__PURE__ */ S(O, { size: 18 })
91
+ icon: /* @__PURE__ */ v(x, { size: 18 })
91
92
  },
92
93
  {
93
94
  id: 3,
94
95
  label: "Tools & Knowledge",
95
- icon: /* @__PURE__ */ S(A, { size: 18 })
96
+ icon: /* @__PURE__ */ v(C, { size: 18 })
96
97
  }
97
- ], X = [
98
+ ], le = [
98
99
  "🤖",
99
100
  "🧠",
100
101
  "💡",
@@ -107,7 +108,7 @@ var I = () => {
107
108
  "⚡",
108
109
  "🌟",
109
110
  "🚀"
110
- ], ee = [
111
+ ], ue = [
111
112
  {
112
113
  key: "MCP_TOOLS",
113
114
  label: "MCP Tools",
@@ -148,167 +149,171 @@ var I = () => {
148
149
  label: "Web Browsing",
149
150
  description: "Browse the web"
150
151
  }
151
- ], te = (e) => {
152
- J((t) => ({
152
+ ], de = (e) => {
153
+ Y((t) => ({
153
154
  ...t,
154
155
  capabilities: t.capabilities.includes(e) ? t.capabilities.filter((t) => t !== e) : [...t.capabilities, e]
155
156
  }));
156
157
  }, Z = async () => {
157
- let e = q.slug || q.name.toLowerCase().replace(/\s+/g, "-");
158
+ if (J.llmModelId && (R || z || !B.some((e) => e.id === J.llmModelId))) {
159
+ w.error("Choose an active answer model from the available catalog.");
160
+ return;
161
+ }
162
+ let e = J.slug || J.name.toLowerCase().replace(/\s+/g, "-");
158
163
  try {
159
- if (W && v) await H({
160
- agentId: v,
164
+ if (G && m) await U({
165
+ agentId: m,
161
166
  input: {
162
- name: q.name,
167
+ name: J.name,
163
168
  slug: e,
164
- description: q.description || void 0,
165
- systemPrompt: q.systemPrompt,
166
- temperature: parseFloat(q.temperature) || .7,
167
- maxTokens: parseInt(q.maxTokens) || 2048,
168
- capabilities: P(q.capabilities),
169
- llmModelId: q.llmModelId || void 0,
170
- type: F(q.type)
169
+ description: J.description || void 0,
170
+ systemPrompt: J.systemPrompt,
171
+ temperature: parseFloat(J.temperature) || .7,
172
+ maxTokens: parseInt(J.maxTokens) || 2048,
173
+ capabilities: D(J.capabilities),
174
+ llmModelId: J.llmModelId || void 0,
175
+ type: O(J.type)
171
176
  }
172
- }), j.success(`Agent "${q.name}" updated successfully`), M(`agents/${v}`);
177
+ }), w.success(`Agent "${J.name}" updated successfully`), T(`agents/${m}`);
173
178
  else {
174
- if (!N) return;
175
- let t = await B({
176
- workspaceId: N,
177
- name: q.name,
179
+ if (!E) return;
180
+ let t = await V({
181
+ workspaceId: E,
182
+ name: J.name,
178
183
  slug: e,
179
- type: F(q.type),
180
- systemPrompt: q.systemPrompt,
181
- temperature: parseFloat(q.temperature) || .7,
182
- maxTokens: parseInt(q.maxTokens) || 2048,
183
- capabilities: P(q.capabilities),
184
- llmModelId: q.llmModelId || void 0,
185
- description: q.description || void 0
184
+ type: O(J.type),
185
+ systemPrompt: J.systemPrompt,
186
+ temperature: parseFloat(J.temperature) || .7,
187
+ maxTokens: parseInt(J.maxTokens) || 2048,
188
+ capabilities: D(J.capabilities),
189
+ llmModelId: J.llmModelId || void 0,
190
+ description: J.description || void 0
186
191
  });
187
- j.success(`Agent "${q.name}" created successfully`), t?.id && M(`agents/${t.id}`);
192
+ w.success(`Agent "${J.name}" created successfully`), t?.id && T(`agents/${t.id}`);
188
193
  }
189
194
  } catch (e) {
190
195
  let t = e instanceof Error ? e.message : "Failed to save agent";
191
- j.error(t);
196
+ w.error(t);
192
197
  }
193
- }, Q = V.loading, $ = U.loading;
194
- return /* @__PURE__ */ C(c, {
195
- title: /* @__PURE__ */ C("div", {
198
+ }, Q = H.loading, $ = W.loading;
199
+ return /* @__PURE__ */ y(i, {
200
+ title: /* @__PURE__ */ y("div", {
196
201
  className: "flex items-center gap-3",
197
- children: [/* @__PURE__ */ S(m, {
202
+ children: [/* @__PURE__ */ v(u, {
198
203
  variant: "ghost",
199
204
  size: "icon",
200
- onClick: () => M(v ? `agents/${v}` : "agents"),
201
- children: /* @__PURE__ */ S(T, { size: 20 })
202
- }), /* @__PURE__ */ S("span", { children: W ? "Edit Agent" : "Create New Agent" })]
205
+ onClick: () => T(m ? `agents/${m}` : "agents"),
206
+ children: /* @__PURE__ */ v(oe, { size: 20 })
207
+ }), /* @__PURE__ */ v("span", { children: G ? "Edit Agent" : "Create New Agent" })]
203
208
  }),
204
- actions: /* @__PURE__ */ C("div", {
209
+ actions: /* @__PURE__ */ y("div", {
205
210
  className: "flex gap-2",
206
- children: [/* @__PURE__ */ S(m, {
211
+ children: [/* @__PURE__ */ v(u, {
207
212
  variant: "outline",
208
- onClick: () => M(v ? `agents/${v}` : "agents"),
213
+ onClick: () => T(m ? `agents/${m}` : "agents"),
209
214
  children: "Cancel"
210
- }), /* @__PURE__ */ S(m, {
211
- leftIcon: /* @__PURE__ */ S(D, { size: 16 }),
215
+ }), /* @__PURE__ */ v(u, {
216
+ leftIcon: /* @__PURE__ */ v(b, { size: 16 }),
212
217
  onClick: Z,
213
218
  isLoading: Q || $,
214
- disabled: !q.name || !q.systemPrompt,
215
- children: W ? "Save Changes" : "Create Agent"
219
+ disabled: !J.name || !J.systemPrompt,
220
+ children: G ? "Save Changes" : "Create Agent"
216
221
  })]
217
222
  }),
218
- children: [/* @__PURE__ */ C("div", {
223
+ children: [/* @__PURE__ */ y("div", {
219
224
  className: "max-w-4xl mx-auto",
220
225
  children: [
221
- /* @__PURE__ */ S(x, {
226
+ /* @__PURE__ */ v(ie, {
222
227
  className: "mb-6",
223
- icon: /* @__PURE__ */ S(k, { size: 18 }),
228
+ icon: /* @__PURE__ */ v(S, { size: 18 }),
224
229
  children: "This guided builder walks you through everything an agent needs — its identity and system prompt, the model and parameters it runs on, and the tools and knowledge it can reach. Work through the steps, then create the agent and test it in chat. You can come back and edit any step later."
225
230
  }),
226
- /* @__PURE__ */ S("div", {
231
+ /* @__PURE__ */ v("div", {
227
232
  className: "flex items-center justify-between mb-8",
228
- children: Y.map((e) => /* @__PURE__ */ C("button", {
229
- onClick: () => K(e.id),
230
- className: s("flex items-center gap-2 px-4 py-2 rounded-lg transition-colors", G === e.id ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-accent"),
231
- children: [e.icon, /* @__PURE__ */ S("span", {
233
+ children: X.map((e) => /* @__PURE__ */ y("button", {
234
+ onClick: () => q(e.id),
235
+ className: r("flex items-center gap-2 px-4 py-2 rounded-lg transition-colors", K === e.id ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-accent"),
236
+ children: [e.icon, /* @__PURE__ */ v("span", {
232
237
  className: "font-medium",
233
238
  children: e.label
234
239
  })]
235
240
  }, e.id))
236
241
  }),
237
- /* @__PURE__ */ C("div", {
242
+ /* @__PURE__ */ y("div", {
238
243
  className: "space-y-6",
239
244
  children: [
240
- G === 0 && /* @__PURE__ */ C(l, {
245
+ K === 0 && /* @__PURE__ */ y(a, {
241
246
  treatment: "glass",
242
247
  glow: !0,
243
- children: [/* @__PURE__ */ C(f, { children: [/* @__PURE__ */ S(p, { children: "Basic Information" }), /* @__PURE__ */ S(d, { children: "Set up the agent's identity and purpose" })] }), /* @__PURE__ */ C(u, {
248
+ children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "Basic Information" }), /* @__PURE__ */ v(s, { children: "Set up the agent's identity and purpose" })] }), /* @__PURE__ */ y(o, {
244
249
  className: "space-y-6",
245
250
  children: [
246
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
251
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
247
252
  className: "text-sm font-medium",
248
253
  children: "Avatar"
249
- }), /* @__PURE__ */ S("div", {
254
+ }), /* @__PURE__ */ v("div", {
250
255
  className: "flex gap-2 mt-2 flex-wrap",
251
- children: X.map((e) => /* @__PURE__ */ S("button", {
252
- onClick: () => J({
253
- ...q,
256
+ children: le.map((e) => /* @__PURE__ */ v("button", {
257
+ onClick: () => Y({
258
+ ...J,
254
259
  avatar: e
255
260
  }),
256
- className: s("text-3xl p-2 rounded-lg border-2 transition-colors", q.avatar === e ? "border-primary bg-action-primary-bg/10" : "border-border-subtle hover:border-primary/50"),
261
+ className: r("text-3xl p-2 rounded-lg border-2 transition-colors", J.avatar === e ? "border-primary bg-action-primary-bg/10" : "border-border-subtle hover:border-primary/50"),
257
262
  children: e
258
263
  }, e))
259
264
  })] }),
260
- /* @__PURE__ */ S(h, {
265
+ /* @__PURE__ */ v(d, {
261
266
  label: "Agent Name",
262
267
  required: !0,
263
- children: /* @__PURE__ */ S(g, {
268
+ children: /* @__PURE__ */ v(f, {
264
269
  placeholder: "e.g., Customer Support Agent",
265
- value: q.name,
266
- onChange: (e) => J({
267
- ...q,
270
+ value: J.name,
271
+ onChange: (e) => Y({
272
+ ...J,
268
273
  name: e.target.value
269
274
  })
270
275
  })
271
276
  }),
272
- /* @__PURE__ */ S(h, {
277
+ /* @__PURE__ */ v(d, {
273
278
  label: "Slug",
274
279
  description: "URL-friendly identifier",
275
- children: /* @__PURE__ */ S(g, {
280
+ children: /* @__PURE__ */ v(f, {
276
281
  placeholder: "customer-support-agent",
277
- value: q.slug,
278
- onChange: (e) => J({
279
- ...q,
282
+ value: J.slug,
283
+ onChange: (e) => Y({
284
+ ...J,
280
285
  slug: e.target.value
281
286
  })
282
287
  })
283
288
  }),
284
- /* @__PURE__ */ S(h, {
289
+ /* @__PURE__ */ v(d, {
285
290
  label: "Description",
286
- children: /* @__PURE__ */ S(_, {
291
+ children: /* @__PURE__ */ v(p, {
287
292
  placeholder: "Describe what this agent does...",
288
- value: q.description,
289
- onChange: (e) => J({
290
- ...q,
293
+ value: J.description,
294
+ onChange: (e) => Y({
295
+ ...J,
291
296
  description: e.target.value
292
297
  }),
293
298
  rows: 3
294
299
  })
295
300
  }),
296
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
301
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
297
302
  className: "text-sm font-medium mb-2 block",
298
303
  children: "Capabilities"
299
- }), /* @__PURE__ */ S("div", {
304
+ }), /* @__PURE__ */ v("div", {
300
305
  className: "grid grid-cols-2 md:grid-cols-3 gap-3",
301
- children: ee.map((e) => /* @__PURE__ */ C("label", {
306
+ children: ue.map((e) => /* @__PURE__ */ y("label", {
302
307
  className: "flex items-start gap-3 p-3 border border-border-subtle rounded-lg cursor-pointer hover:bg-accent",
303
- children: [/* @__PURE__ */ S("input", {
308
+ children: [/* @__PURE__ */ v("input", {
304
309
  type: "checkbox",
305
310
  className: "h-4 w-4 rounded border-border-default mt-0.5",
306
- checked: q.capabilities.includes(e.key),
307
- onChange: () => te(e.key)
308
- }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
311
+ checked: J.capabilities.includes(e.key),
312
+ onChange: () => de(e.key)
313
+ }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
309
314
  className: "font-medium text-sm",
310
315
  children: e.label
311
- }), /* @__PURE__ */ S("p", {
316
+ }), /* @__PURE__ */ v("p", {
312
317
  className: "text-xs text-text-secondary",
313
318
  children: e.description
314
319
  })] })]
@@ -317,51 +322,51 @@ var I = () => {
317
322
  ]
318
323
  })]
319
324
  }),
320
- G === 1 && /* @__PURE__ */ C(l, {
325
+ K === 1 && /* @__PURE__ */ y(a, {
321
326
  treatment: "glass",
322
327
  glow: !0,
323
- children: [/* @__PURE__ */ C(f, { children: [/* @__PURE__ */ S(p, { children: "Prompt Configuration" }), /* @__PURE__ */ S(d, { children: "Define how the agent communicates and behaves" })] }), /* @__PURE__ */ C(u, {
328
+ children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "Prompt Configuration" }), /* @__PURE__ */ v(s, { children: "Define how the agent communicates and behaves" })] }), /* @__PURE__ */ y(o, {
324
329
  className: "space-y-6",
325
- children: [/* @__PURE__ */ S(h, {
330
+ children: [/* @__PURE__ */ v(d, {
326
331
  label: "System Prompt",
327
332
  required: !0,
328
333
  description: "The core instructions that define the agent's behavior",
329
- children: /* @__PURE__ */ S(_, {
334
+ children: /* @__PURE__ */ v(p, {
330
335
  placeholder: "You are a helpful assistant...",
331
- value: q.systemPrompt,
332
- onChange: (e) => J({
333
- ...q,
336
+ value: J.systemPrompt,
337
+ onChange: (e) => Y({
338
+ ...J,
334
339
  systemPrompt: e.target.value
335
340
  }),
336
341
  rows: 8,
337
342
  className: "font-mono text-sm"
338
343
  })
339
- }), /* @__PURE__ */ C("div", {
344
+ }), /* @__PURE__ */ y("div", {
340
345
  className: "grid grid-cols-2 gap-4",
341
- children: [/* @__PURE__ */ S(h, {
346
+ children: [/* @__PURE__ */ v(d, {
342
347
  label: "Temperature",
343
348
  description: "Controls randomness (0-2)",
344
- children: /* @__PURE__ */ S(g, {
349
+ children: /* @__PURE__ */ v(f, {
345
350
  type: "number",
346
351
  step: "0.1",
347
352
  min: "0",
348
353
  max: "2",
349
- value: q.temperature,
350
- onChange: (e) => J({
351
- ...q,
354
+ value: J.temperature,
355
+ onChange: (e) => Y({
356
+ ...J,
352
357
  temperature: e.target.value
353
358
  })
354
359
  })
355
- }), /* @__PURE__ */ S(h, {
360
+ }), /* @__PURE__ */ v(d, {
356
361
  label: "Max Tokens",
357
362
  description: "Maximum response length",
358
- children: /* @__PURE__ */ S(g, {
363
+ children: /* @__PURE__ */ v(f, {
359
364
  type: "number",
360
365
  step: "256",
361
366
  min: "1",
362
- value: q.maxTokens,
363
- onChange: (e) => J({
364
- ...q,
367
+ value: J.maxTokens,
368
+ onChange: (e) => Y({
369
+ ...J,
365
370
  maxTokens: e.target.value
366
371
  })
367
372
  })
@@ -369,49 +374,67 @@ var I = () => {
369
374
  })]
370
375
  })]
371
376
  }),
372
- G === 2 && /* @__PURE__ */ C(l, {
377
+ K === 2 && /* @__PURE__ */ y(a, {
373
378
  treatment: "glass",
374
379
  glow: !0,
375
- children: [/* @__PURE__ */ C(f, { children: [/* @__PURE__ */ S(p, { children: "LLM Configuration" }), /* @__PURE__ */ S(d, { children: "Select the LLM model for this agent" })] }), /* @__PURE__ */ C(u, {
380
+ children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "LLM Configuration" }), /* @__PURE__ */ v(s, { children: "Select the LLM model for this agent" })] }), /* @__PURE__ */ y(o, {
376
381
  className: "space-y-6",
377
382
  children: [
378
- /* @__PURE__ */ S(h, {
383
+ /* @__PURE__ */ y(d, {
379
384
  label: "LLM Model",
380
385
  description: "Select a model for this agent",
381
- children: /* @__PURE__ */ C("select", {
382
- className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
383
- value: q.llmModelId,
384
- onChange: (e) => J({
385
- ...q,
386
- llmModelId: e.target.value
386
+ children: [
387
+ R && /* @__PURE__ */ v("p", {
388
+ role: "status",
389
+ children: "Loading answer models…"
387
390
  }),
388
- children: [/* @__PURE__ */ S("option", {
389
- value: "",
390
- children: "Select a model..."
391
- }), z?.map((e) => /* @__PURE__ */ C("option", {
392
- value: e.id,
393
- children: [
394
- e.name,
395
- " (",
396
- e.modelId,
397
- ")"
398
- ]
399
- }, e.id))]
400
- })
391
+ z && /* @__PURE__ */ y("div", {
392
+ role: "alert",
393
+ children: [/* @__PURE__ */ v("p", { children: "Could not load answer models." }), /* @__PURE__ */ v(u, {
394
+ variant: "secondary",
395
+ onClick: () => {
396
+ L(), N();
397
+ },
398
+ children: "Retry model catalog"
399
+ })]
400
+ }),
401
+ /* @__PURE__ */ y("select", {
402
+ "aria-label": "LLM Model",
403
+ disabled: R || !!z,
404
+ className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
405
+ value: J.llmModelId,
406
+ onChange: (e) => Y({
407
+ ...J,
408
+ llmModelId: e.target.value
409
+ }),
410
+ children: [/* @__PURE__ */ v("option", {
411
+ value: "",
412
+ children: "Select a model..."
413
+ }), B.map((e) => /* @__PURE__ */ y("option", {
414
+ value: e.id,
415
+ children: [
416
+ e.name,
417
+ " (",
418
+ e.modelId,
419
+ ")"
420
+ ]
421
+ }, e.id))]
422
+ })
423
+ ]
401
424
  }),
402
- /* @__PURE__ */ C("div", {
425
+ /* @__PURE__ */ y("div", {
403
426
  className: "p-4 bg-bg-sunken rounded-lg",
404
- children: [/* @__PURE__ */ S("h4", {
427
+ children: [/* @__PURE__ */ v("h4", {
405
428
  className: "text-sm font-medium mb-2",
406
429
  children: "Available Providers"
407
- }), /* @__PURE__ */ C("div", {
430
+ }), /* @__PURE__ */ y("div", {
408
431
  className: "grid grid-cols-2 gap-2",
409
- children: [R?.map((e) => /* @__PURE__ */ C("div", {
432
+ children: [j?.map((e) => /* @__PURE__ */ y("div", {
410
433
  className: "text-sm",
411
- children: [/* @__PURE__ */ S("span", {
434
+ children: [/* @__PURE__ */ v("span", {
412
435
  className: "font-medium",
413
436
  children: e.name
414
- }), /* @__PURE__ */ C("span", {
437
+ }), /* @__PURE__ */ y("span", {
415
438
  className: "text-text-secondary ml-2",
416
439
  children: [
417
440
  "(",
@@ -419,36 +442,36 @@ var I = () => {
419
442
  ")"
420
443
  ]
421
444
  })]
422
- }, e.id)), !R?.length && /* @__PURE__ */ S("p", {
445
+ }, e.id)), !R && !z && !j?.length && /* @__PURE__ */ v("p", {
423
446
  className: "text-sm text-text-secondary",
424
447
  children: "No providers configured"
425
448
  })]
426
449
  })]
427
450
  }),
428
- !z?.length && /* @__PURE__ */ S("p", {
451
+ !R && !z && !B.length && /* @__PURE__ */ v("p", {
429
452
  className: "text-sm text-text-secondary",
430
453
  children: "No models available. Configure a provider and add models in Settings."
431
454
  })
432
455
  ]
433
456
  })]
434
457
  }),
435
- G === 3 && /* @__PURE__ */ S("div", {
458
+ K === 3 && /* @__PURE__ */ v("div", {
436
459
  className: "space-y-6",
437
- children: /* @__PURE__ */ C(l, {
460
+ children: /* @__PURE__ */ y(a, {
438
461
  treatment: "glass",
439
462
  glow: !0,
440
- children: [/* @__PURE__ */ C(f, { children: [/* @__PURE__ */ C(p, {
463
+ children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ y(l, {
441
464
  className: "flex items-center gap-2",
442
- children: [/* @__PURE__ */ S(A, { size: 18 }), "Tools & Knowledge"]
443
- }), /* @__PURE__ */ S(d, { children: "Configure tools and knowledge bases for this agent" })] }), /* @__PURE__ */ S(u, { children: /* @__PURE__ */ C("div", {
465
+ children: [/* @__PURE__ */ v(C, { size: 18 }), "Tools & Knowledge"]
466
+ }), /* @__PURE__ */ v(s, { children: "Configure tools and knowledge bases for this agent" })] }), /* @__PURE__ */ v(o, { children: /* @__PURE__ */ y("div", {
444
467
  className: "text-center py-12 text-text-secondary",
445
468
  children: [
446
- /* @__PURE__ */ S(A, { className: "h-10 w-10 mx-auto mb-3 opacity-50" }),
447
- /* @__PURE__ */ S("p", {
469
+ /* @__PURE__ */ v(C, { className: "h-10 w-10 mx-auto mb-3 opacity-50" }),
470
+ /* @__PURE__ */ v("p", {
448
471
  className: "font-medium",
449
472
  children: "Tools & Knowledge coming soon"
450
473
  }),
451
- /* @__PURE__ */ S("p", {
474
+ /* @__PURE__ */ v("p", {
452
475
  className: "text-sm mt-2",
453
476
  children: "MCP tool connections and knowledge base bindings will be configurable here in a future update."
454
477
  })
@@ -456,31 +479,31 @@ var I = () => {
456
479
  }) })]
457
480
  })
458
481
  }),
459
- /* @__PURE__ */ C("div", {
482
+ /* @__PURE__ */ y("div", {
460
483
  className: "flex justify-between pt-6",
461
- children: [/* @__PURE__ */ S(m, {
484
+ children: [/* @__PURE__ */ v(u, {
462
485
  variant: "outline",
463
- onClick: () => K(Math.max(0, G - 1)),
464
- disabled: G === 0,
486
+ onClick: () => q(Math.max(0, K - 1)),
487
+ disabled: K === 0,
465
488
  children: "Previous"
466
- }), G < Y.length - 1 ? /* @__PURE__ */ S(m, {
467
- onClick: () => K(G + 1),
489
+ }), K < X.length - 1 ? /* @__PURE__ */ v(u, {
490
+ onClick: () => q(K + 1),
468
491
  children: "Next"
469
- }) : /* @__PURE__ */ S(m, {
470
- leftIcon: /* @__PURE__ */ S(D, { size: 16 }),
492
+ }) : /* @__PURE__ */ v(u, {
493
+ leftIcon: /* @__PURE__ */ v(b, { size: 16 }),
471
494
  onClick: Z,
472
495
  isLoading: Q || $,
473
- disabled: !q.name || !q.systemPrompt,
474
- children: W ? "Save Changes" : "Create Agent"
496
+ disabled: !J.name || !J.systemPrompt,
497
+ children: G ? "Save Changes" : "Create Agent"
475
498
  })]
476
499
  })
477
500
  ]
478
501
  })
479
502
  ]
480
- }), L && L.length > 0 && null]
503
+ }), A && A.length > 0 && null]
481
504
  });
482
505
  };
483
506
  //#endregion
484
- export { I as AgentBuilderPage };
507
+ export { k as AgentBuilderPage };
485
508
 
486
509
  //# sourceMappingURL=AgentBuilderPage.js.map