@burdenoff/microfe-botmanor 2026.1117.1 → 2026.1118.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.
- package/dist/botlit/BotlitRoutes.js +59 -55
- package/dist/botlit/BotlitRoutes.js.map +1 -1
- package/dist/botlit/components/AgentA2APanel.d.ts +13 -0
- package/dist/botlit/components/AgentA2APanel.js +149 -0
- package/dist/botlit/components/AgentA2APanel.js.map +1 -0
- package/dist/botlit/components/BotAgentsPanel.d.ts +15 -0
- package/dist/botlit/components/BotAgentsPanel.js +341 -0
- package/dist/botlit/components/BotAgentsPanel.js.map +1 -0
- package/dist/botlit/components/BotFormFields.d.ts +4 -0
- package/dist/botlit/components/BotFormFields.js +108 -74
- package/dist/botlit/components/BotFormFields.js.map +1 -1
- package/dist/botlit/components/BotRoutingSummary.d.ts +13 -0
- package/dist/botlit/components/BotRoutingSummary.js +126 -0
- package/dist/botlit/components/BotRoutingSummary.js.map +1 -0
- package/dist/botlit/components/BotVersionHistoryPanel.d.ts +8 -0
- package/dist/botlit/components/BotVersionHistoryPanel.js +172 -0
- package/dist/botlit/components/BotVersionHistoryPanel.js.map +1 -0
- package/dist/botlit/components/CreateFromTemplate.d.ts +12 -0
- package/dist/botlit/components/CreateFromTemplate.js +129 -0
- package/dist/botlit/components/CreateFromTemplate.js.map +1 -0
- package/dist/botlit/components/EntityTags.d.ts +24 -0
- package/dist/botlit/components/EntityTags.js +72 -0
- package/dist/botlit/components/EntityTags.js.map +1 -0
- package/dist/botlit/components/GuardrailPoliciesPanel.d.ts +10 -0
- package/dist/botlit/components/GuardrailPoliciesPanel.js +91 -0
- package/dist/botlit/components/GuardrailPoliciesPanel.js.map +1 -0
- package/dist/botlit/hooks/useA2AConnections.d.ts +21 -0
- package/dist/botlit/hooks/useA2AConnections.js +82 -0
- package/dist/botlit/hooks/useA2AConnections.js.map +1 -0
- package/dist/botlit/hooks/useAgentTestChat.d.ts +29 -0
- package/dist/botlit/hooks/useAgentTestChat.js +35 -0
- package/dist/botlit/hooks/useAgentTestChat.js.map +1 -0
- package/dist/botlit/hooks/useAgents.d.ts +3 -0
- package/dist/botlit/hooks/useAgents.js +4 -0
- package/dist/botlit/hooks/useAgents.js.map +1 -1
- package/dist/botlit/hooks/useBotAgents.d.ts +22 -1
- package/dist/botlit/hooks/useBotAgents.js +46 -12
- package/dist/botlit/hooks/useBotAgents.js.map +1 -1
- package/dist/botlit/hooks/useBotVersions.d.ts +25 -0
- package/dist/botlit/hooks/useBotVersions.js +69 -0
- package/dist/botlit/hooks/useBotVersions.js.map +1 -0
- package/dist/botlit/hooks/useBots.d.ts +3 -0
- package/dist/botlit/hooks/useBots.js +4 -0
- package/dist/botlit/hooks/useBots.js.map +1 -1
- package/dist/botlit/hooks/useLLMProviders.js +40 -32
- package/dist/botlit/hooks/useLLMProviders.js.map +1 -1
- package/dist/botlit/hooks/useTemplates.d.ts +19 -0
- package/dist/botlit/hooks/useTemplates.js +71 -0
- package/dist/botlit/hooks/useTemplates.js.map +1 -0
- package/dist/botlit/pages/AgentBuilderPage.js +388 -347
- package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
- package/dist/botlit/pages/AgentDetailPage.js +237 -247
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/AgentTestChatPage.d.ts +2 -0
- package/dist/botlit/pages/AgentTestChatPage.js +176 -0
- package/dist/botlit/pages/AgentTestChatPage.js.map +1 -0
- package/dist/botlit/pages/AgentsListPage.js +2 -2
- package/dist/botlit/pages/AgentsListPage.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +398 -447
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/botlit/pages/ChatPage.js +19 -12
- package/dist/botlit/pages/ChatPage.js.map +1 -1
- package/dist/botlit/pages/SettingsPage.d.ts +7 -0
- package/dist/botlit/pages/SettingsPage.js +120 -85
- package/dist/botlit/pages/SettingsPage.js.map +1 -1
- package/dist/botlit/pages/index.d.ts +1 -0
- package/dist/botlit/utils/botRouting.d.ts +42 -0
- package/dist/botlit/utils/botRouting.js +52 -0
- package/dist/botlit/utils/botRouting.js.map +1 -0
- package/dist/generated/wspace-operations.js +41 -43
- package/dist/generated/wspace-operations.js.map +1 -1
- package/package.json +10 -12
|
@@ -7,17 +7,17 @@ import { Button as l } from "../components/Button.js";
|
|
|
7
7
|
import { FormField as u, Input as d } from "../components/Input.js";
|
|
8
8
|
import { Badge as f } from "../components/Badge.js";
|
|
9
9
|
import "../permissions/index.js";
|
|
10
|
-
import { ModelRegistrationPanel as
|
|
11
|
-
import { useConfigureLLMProvider as
|
|
12
|
-
import { cn as
|
|
13
|
-
import { toUnion as
|
|
14
|
-
import { useState as
|
|
15
|
-
import { PagePurpose as
|
|
10
|
+
import { ModelRegistrationPanel as ee } from "../components/ModelRegistrationPanel.js";
|
|
11
|
+
import { useConfigureLLMProvider as te, useLLMModels as p, useLLMProviders as m, useTestLLMConnection as h } from "../hooks/useLLMProviders.js";
|
|
12
|
+
import { cn as g } from "../utils/cn.js";
|
|
13
|
+
import { toUnion as _ } from "../utils/unions.js";
|
|
14
|
+
import { useState as v } from "react";
|
|
15
|
+
import { PagePurpose as ne } from "@burdenoff/fe-libs/ui";
|
|
16
16
|
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
17
|
-
import { Brain as
|
|
18
|
-
import { toast as
|
|
17
|
+
import { Brain as re, ExternalLink as ie, Key as x, Link2 as S, Save as C } from "lucide-react";
|
|
18
|
+
import { toast as w } from "sonner";
|
|
19
19
|
// src/botlit/pages/SettingsPage.tsx
|
|
20
|
-
var
|
|
20
|
+
var T = [
|
|
21
21
|
"OPENAI",
|
|
22
22
|
"ANTHROPIC",
|
|
23
23
|
"GOOGLE",
|
|
@@ -25,14 +25,44 @@ var D = [
|
|
|
25
25
|
"AWS_BEDROCK",
|
|
26
26
|
"CUSTOM"
|
|
27
27
|
];
|
|
28
|
+
function E(e) {
|
|
29
|
+
return _(e.toUpperCase(), T, "CUSTOM");
|
|
30
|
+
}
|
|
31
|
+
var D = {
|
|
32
|
+
OPENAI: "OpenAI",
|
|
33
|
+
ANTHROPIC: "Anthropic",
|
|
34
|
+
GOOGLE: "Google AI",
|
|
35
|
+
AZURE_OPENAI: "Azure OpenAI",
|
|
36
|
+
AWS_BEDROCK: "AWS Bedrock",
|
|
37
|
+
CUSTOM: "Custom"
|
|
38
|
+
};
|
|
28
39
|
function O(e) {
|
|
29
|
-
return
|
|
40
|
+
return D[E(e)];
|
|
41
|
+
}
|
|
42
|
+
function k(e, t) {
|
|
43
|
+
return t?.trim() || O(e);
|
|
30
44
|
}
|
|
31
|
-
var
|
|
32
|
-
let
|
|
45
|
+
var A = ({ providerId: e, providerName: t }) => {
|
|
46
|
+
let [n, r] = h();
|
|
47
|
+
return /* @__PURE__ */ y(l, {
|
|
48
|
+
variant: "outline",
|
|
49
|
+
size: "sm",
|
|
50
|
+
isLoading: r.loading,
|
|
51
|
+
"aria-label": `Test connection to ${t}`,
|
|
52
|
+
onClick: async () => {
|
|
53
|
+
try {
|
|
54
|
+
await n(e) ? w.success(`${t}: connection works`) : w.error(`${t}: the provider did not accept the request`);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
w.error(e instanceof Error ? e.message : `${t}: connection test failed`);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
children: "Test connection"
|
|
60
|
+
});
|
|
61
|
+
}, j = () => {
|
|
62
|
+
let h = e(), { data: _, refetch: T, loading: D, error: O } = m(), { configureProvider: j, isConfiguring: M } = te(), { data: N, refetch: P, loading: ae, error: F } = p(), I = D || ae, L = O || F, [R, z] = v(""), [B, V] = v(!0), [H, U] = v("openai"), [W, G] = v(null), [K, q] = v("apikey"), [J, Y] = v(""), [X, Z] = v("ap-south-1"), Q = H === "aws_bedrock", $ = Q && K === "iam", oe = /^[a-z]{2}(?:-[a-z]+)+-\d+$/.test(X.trim());
|
|
33
63
|
return /* @__PURE__ */ y(t, {
|
|
34
|
-
title:
|
|
35
|
-
description:
|
|
64
|
+
title: h("botlit.settings.title", "Settings"),
|
|
65
|
+
description: h("botlit.settings.description", "Configure your BotManor workspace settings"),
|
|
36
66
|
children: /* @__PURE__ */ b("div", {
|
|
37
67
|
className: "space-y-6",
|
|
38
68
|
children: [
|
|
@@ -45,27 +75,27 @@ var k = () => {
|
|
|
45
75
|
children: [/* @__PURE__ */ y("p", { children: "Could not load providers and models. Try loading the catalog again." }), /* @__PURE__ */ y(l, {
|
|
46
76
|
variant: "secondary",
|
|
47
77
|
onClick: () => {
|
|
48
|
-
|
|
78
|
+
T(), P();
|
|
49
79
|
},
|
|
50
80
|
children: "Retry model catalog"
|
|
51
81
|
})]
|
|
52
82
|
}),
|
|
53
|
-
/* @__PURE__ */ y(
|
|
54
|
-
icon: /* @__PURE__ */ y(
|
|
55
|
-
children:
|
|
83
|
+
/* @__PURE__ */ y(ne, {
|
|
84
|
+
icon: /* @__PURE__ */ y(x, { size: 18 }),
|
|
85
|
+
children: h("botlit.settings.purpose", "Workspace-wide settings for LLM Providers — connect at least one model provider (OpenAI, Anthropic, Google and others) so your agents have a brain to think with.")
|
|
56
86
|
}),
|
|
57
87
|
/* @__PURE__ */ b(n, {
|
|
58
88
|
treatment: "glass",
|
|
59
89
|
glow: !0,
|
|
60
|
-
children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children:
|
|
90
|
+
children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children: h("botlit.settings.providers.title", "LLM Providers") }), /* @__PURE__ */ y(i, { children: h("botlit.settings.providers.description", "Configure API keys for AI model providers") })] }), /* @__PURE__ */ y(r, {
|
|
61
91
|
className: "space-y-4",
|
|
62
|
-
children:
|
|
92
|
+
children: _?.map((e) => /* @__PURE__ */ b("div", {
|
|
63
93
|
className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg",
|
|
64
94
|
children: [/* @__PURE__ */ b("div", {
|
|
65
95
|
className: "flex items-center gap-4",
|
|
66
96
|
children: [/* @__PURE__ */ y("div", {
|
|
67
97
|
className: "p-2 bg-action-primary-bg/10 rounded-lg",
|
|
68
|
-
children: e.connectionId ? /* @__PURE__ */ y(
|
|
98
|
+
children: e.connectionId ? /* @__PURE__ */ y(S, { className: "h-5 w-5 text-primary" }) : /* @__PURE__ */ y(x, { className: "h-5 w-5 text-primary" })
|
|
69
99
|
}), /* @__PURE__ */ b("div", { children: [
|
|
70
100
|
/* @__PURE__ */ y("p", {
|
|
71
101
|
className: "font-medium",
|
|
@@ -73,15 +103,15 @@ var k = () => {
|
|
|
73
103
|
}),
|
|
74
104
|
/* @__PURE__ */ y("p", {
|
|
75
105
|
className: "text-sm text-text-secondary",
|
|
76
|
-
children:
|
|
106
|
+
children: h("botlit.settings.providers.type", "Type: {{type}}", { type: e.type })
|
|
77
107
|
}),
|
|
78
108
|
e.connectionId && /* @__PURE__ */ y("p", {
|
|
79
109
|
className: "text-xs text-text-secondary mt-0.5",
|
|
80
|
-
children:
|
|
110
|
+
children: h("botlit.settings.providers.connectedViaIntegrations", "Connected via Integrations")
|
|
81
111
|
}),
|
|
82
112
|
!e.connectionId && e.credentialsHash && /* @__PURE__ */ y("p", {
|
|
83
113
|
className: "text-xs text-text-secondary mt-0.5",
|
|
84
|
-
children:
|
|
114
|
+
children: h("botlit.settings.providers.apiKeyStored", "API key stored locally")
|
|
85
115
|
})
|
|
86
116
|
] })]
|
|
87
117
|
}), /* @__PURE__ */ b("div", {
|
|
@@ -89,11 +119,18 @@ var k = () => {
|
|
|
89
119
|
children: [
|
|
90
120
|
e.connectionId && /* @__PURE__ */ y(f, {
|
|
91
121
|
variant: "default",
|
|
92
|
-
children:
|
|
122
|
+
children: h("botlit.settings.providers.integrationBadge", "Integration")
|
|
93
123
|
}),
|
|
94
124
|
/* @__PURE__ */ y(f, {
|
|
95
125
|
variant: e.isActive ? "success" : "secondary",
|
|
96
|
-
children: e.isActive ?
|
|
126
|
+
children: e.isActive ? h("botlit.settings.providers.active", "Active") : h("botlit.settings.providers.inactive", "Inactive")
|
|
127
|
+
}),
|
|
128
|
+
e.isActive && /* @__PURE__ */ y(c, {
|
|
129
|
+
permission: s.LLM_TEST,
|
|
130
|
+
children: /* @__PURE__ */ y(A, {
|
|
131
|
+
providerId: e.id,
|
|
132
|
+
providerName: e.name
|
|
133
|
+
})
|
|
97
134
|
}),
|
|
98
135
|
/* @__PURE__ */ y(c, {
|
|
99
136
|
permission: s.LLM_UPDATE,
|
|
@@ -103,7 +140,7 @@ var k = () => {
|
|
|
103
140
|
onClick: () => {
|
|
104
141
|
G(e.id), V(e.isActive), U(e.type.toLowerCase()), z(""), Y(e.connectionId || ""), q(e.type === "AWS_BEDROCK" && e.metadata?.awsAuthentication === "iam" ? "iam" : e.connectionId ? "integration" : "apikey"), Z(typeof e.metadata?.region == "string" ? e.metadata.region : "ap-south-1"), document.getElementById("provider-form")?.scrollIntoView({ behavior: "smooth" });
|
|
105
142
|
},
|
|
106
|
-
children:
|
|
143
|
+
children: h("botlit.settings.actions.configure", "Configure")
|
|
107
144
|
})
|
|
108
145
|
})
|
|
109
146
|
]
|
|
@@ -111,17 +148,17 @@ var k = () => {
|
|
|
111
148
|
}, e.id))
|
|
112
149
|
})]
|
|
113
150
|
}),
|
|
114
|
-
/* @__PURE__ */ b(n, { children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children:
|
|
151
|
+
/* @__PURE__ */ b(n, { children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children: h("botlit.settings.models.title", "LLM Models") }), /* @__PURE__ */ y(i, { children: h("botlit.settings.models.description", "Registered models across your providers") })] }), /* @__PURE__ */ y(r, {
|
|
115
152
|
className: "space-y-4",
|
|
116
|
-
children:
|
|
117
|
-
let t =
|
|
153
|
+
children: N && N.length > 0 ? N.map((e) => {
|
|
154
|
+
let t = _?.find((t) => t.id === e.providerId)?.name;
|
|
118
155
|
return /* @__PURE__ */ b("div", {
|
|
119
156
|
className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg",
|
|
120
157
|
children: [/* @__PURE__ */ b("div", {
|
|
121
158
|
className: "flex items-center gap-4",
|
|
122
159
|
children: [/* @__PURE__ */ y("div", {
|
|
123
160
|
className: "p-2 bg-accent rounded-lg",
|
|
124
|
-
children: /* @__PURE__ */ y(
|
|
161
|
+
children: /* @__PURE__ */ y(re, { className: "h-5 w-5 text-text-primary" })
|
|
125
162
|
}), /* @__PURE__ */ b("div", { children: [
|
|
126
163
|
/* @__PURE__ */ y("p", {
|
|
127
164
|
className: "font-medium",
|
|
@@ -134,39 +171,39 @@ var k = () => {
|
|
|
134
171
|
/* @__PURE__ */ b("div", {
|
|
135
172
|
className: "flex gap-3 mt-1 text-xs text-text-secondary",
|
|
136
173
|
children: [
|
|
137
|
-
e.contextWindow != null && /* @__PURE__ */ y("span", { children:
|
|
138
|
-
e.maxOutputTokens != null && /* @__PURE__ */ y("span", { children:
|
|
139
|
-
e.inputPricePerMToken != null && /* @__PURE__ */ y("span", { children:
|
|
140
|
-
e.outputPricePerMToken != null && /* @__PURE__ */ y("span", { children:
|
|
174
|
+
e.contextWindow != null && /* @__PURE__ */ y("span", { children: h("botlit.settings.models.context", "Context: {{value}}K", { value: (e.contextWindow / 1e3).toFixed(0) }) }),
|
|
175
|
+
e.maxOutputTokens != null && /* @__PURE__ */ y("span", { children: h("botlit.settings.models.maxOut", "Max out: {{value}}K", { value: (e.maxOutputTokens / 1e3).toFixed(0) }) }),
|
|
176
|
+
e.inputPricePerMToken != null && /* @__PURE__ */ y("span", { children: h("botlit.settings.models.priceIn", "${{value}}/M in", { value: e.inputPricePerMToken }) }),
|
|
177
|
+
e.outputPricePerMToken != null && /* @__PURE__ */ y("span", { children: h("botlit.settings.models.priceOut", "${{value}}/M out", { value: e.outputPricePerMToken }) })
|
|
141
178
|
]
|
|
142
179
|
})
|
|
143
180
|
] })]
|
|
144
181
|
}), /* @__PURE__ */ y(f, {
|
|
145
182
|
variant: e.isActive ? "success" : "secondary",
|
|
146
|
-
children: e.isActive ?
|
|
183
|
+
children: e.isActive ? h("botlit.settings.providers.active", "Active") : h("botlit.settings.providers.inactive", "Inactive")
|
|
147
184
|
})]
|
|
148
185
|
}, e.id);
|
|
149
186
|
}) : !I && !L ? /* @__PURE__ */ y("p", {
|
|
150
187
|
className: "text-sm text-text-secondary text-center py-4",
|
|
151
|
-
children:
|
|
188
|
+
children: h("botlit.settings.models.empty", "No models registered yet.")
|
|
152
189
|
}) : null
|
|
153
190
|
})] }),
|
|
154
191
|
!I && !L && /* @__PURE__ */ y(c, {
|
|
155
192
|
permission: s.LLM_CREATE,
|
|
156
|
-
children: /* @__PURE__ */ y(
|
|
157
|
-
providers:
|
|
158
|
-
onCreated: () => void
|
|
193
|
+
children: /* @__PURE__ */ y(ee, {
|
|
194
|
+
providers: _ ?? [],
|
|
195
|
+
onCreated: () => void P()
|
|
159
196
|
})
|
|
160
197
|
}),
|
|
161
198
|
/* @__PURE__ */ y(c, {
|
|
162
199
|
permission: s.LLM_CREATE,
|
|
163
200
|
children: /* @__PURE__ */ b(n, {
|
|
164
201
|
id: "provider-form",
|
|
165
|
-
children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children: W ?
|
|
202
|
+
children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children: W ? h("botlit.settings.form.updateTitle", "Update Provider") : h("botlit.settings.form.addTitle", "Add Provider") }), /* @__PURE__ */ y(i, { children: W ? h("botlit.settings.form.updateDescription", "Update credentials for this provider") : h("botlit.settings.form.addDescription", "Configure a new LLM provider") })] }), /* @__PURE__ */ b(r, {
|
|
166
203
|
className: "space-y-4",
|
|
167
204
|
children: [
|
|
168
205
|
/* @__PURE__ */ y(u, {
|
|
169
|
-
label:
|
|
206
|
+
label: h("botlit.settings.form.providerLabel", "Provider"),
|
|
170
207
|
children: /* @__PURE__ */ b("select", {
|
|
171
208
|
className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
|
|
172
209
|
value: H,
|
|
@@ -222,12 +259,12 @@ var k = () => {
|
|
|
222
259
|
})]
|
|
223
260
|
}),
|
|
224
261
|
/* @__PURE__ */ y(u, {
|
|
225
|
-
label:
|
|
262
|
+
label: h("botlit.settings.form.credentialMethod", "Credential Method"),
|
|
226
263
|
children: /* @__PURE__ */ b("div", {
|
|
227
264
|
className: "flex flex-wrap gap-3",
|
|
228
265
|
children: [
|
|
229
266
|
Q && /* @__PURE__ */ b("label", {
|
|
230
|
-
className:
|
|
267
|
+
className: g("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer flex-1", $ ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
|
|
231
268
|
children: [/* @__PURE__ */ y("input", {
|
|
232
269
|
type: "radio",
|
|
233
270
|
name: "credentialMethod",
|
|
@@ -239,7 +276,7 @@ var k = () => {
|
|
|
239
276
|
}), "Managed AWS IAM"]
|
|
240
277
|
}),
|
|
241
278
|
/* @__PURE__ */ b("label", {
|
|
242
|
-
className:
|
|
279
|
+
className: g("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer transition-colors flex-1", K === "integration" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
|
|
243
280
|
children: [/* @__PURE__ */ y("input", {
|
|
244
281
|
type: "radio",
|
|
245
282
|
name: "credentialMethod",
|
|
@@ -249,14 +286,14 @@ var k = () => {
|
|
|
249
286
|
className: "h-4 w-4"
|
|
250
287
|
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
251
288
|
className: "font-medium text-sm",
|
|
252
|
-
children:
|
|
289
|
+
children: h("botlit.settings.form.integrationOption", "Connect via Integrations")
|
|
253
290
|
}), /* @__PURE__ */ y("p", {
|
|
254
291
|
className: "text-xs text-text-secondary",
|
|
255
|
-
children:
|
|
292
|
+
children: h("botlit.settings.form.integrationHint", "Managed credentials (recommended)")
|
|
256
293
|
})] })]
|
|
257
294
|
}),
|
|
258
295
|
/* @__PURE__ */ b("label", {
|
|
259
|
-
className:
|
|
296
|
+
className: g("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer transition-colors flex-1", K === "apikey" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
|
|
260
297
|
children: [/* @__PURE__ */ y("input", {
|
|
261
298
|
type: "radio",
|
|
262
299
|
name: "credentialMethod",
|
|
@@ -266,10 +303,10 @@ var k = () => {
|
|
|
266
303
|
className: "h-4 w-4"
|
|
267
304
|
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
268
305
|
className: "font-medium text-sm",
|
|
269
|
-
children:
|
|
306
|
+
children: h("botlit.settings.form.apiKeyOption", "Enter API Key")
|
|
270
307
|
}), /* @__PURE__ */ y("p", {
|
|
271
308
|
className: "text-xs text-text-secondary",
|
|
272
|
-
children:
|
|
309
|
+
children: h("botlit.settings.form.apiKeyHint", "Paste key directly (legacy)")
|
|
273
310
|
})] })]
|
|
274
311
|
})
|
|
275
312
|
]
|
|
@@ -281,16 +318,16 @@ var k = () => {
|
|
|
281
318
|
className: "p-4 bg-bg-sunken/50 border border-border-subtle rounded-lg",
|
|
282
319
|
children: /* @__PURE__ */ b("div", {
|
|
283
320
|
className: "flex items-start gap-3",
|
|
284
|
-
children: [/* @__PURE__ */ y(
|
|
321
|
+
children: [/* @__PURE__ */ y(S, { className: "h-5 w-5 text-primary mt-0.5 flex-shrink-0" }), /* @__PURE__ */ b("div", {
|
|
285
322
|
className: "space-y-2 flex-1",
|
|
286
323
|
children: [
|
|
287
324
|
/* @__PURE__ */ y("p", {
|
|
288
325
|
className: "text-sm font-medium",
|
|
289
|
-
children:
|
|
326
|
+
children: h("botlit.settings.form.integrationTitle", "Integration Connection")
|
|
290
327
|
}),
|
|
291
328
|
/* @__PURE__ */ y("p", {
|
|
292
329
|
className: "text-xs text-text-secondary",
|
|
293
|
-
children:
|
|
330
|
+
children: h("botlit.settings.form.integrationDescription", "Create a connection in the Integrations module, then paste the Connection ID here. This stores your API key securely in the Integrations vault.")
|
|
294
331
|
}),
|
|
295
332
|
/* @__PURE__ */ y("div", {
|
|
296
333
|
className: "flex gap-2 mt-2",
|
|
@@ -300,29 +337,29 @@ var k = () => {
|
|
|
300
337
|
onClick: () => {
|
|
301
338
|
window.open("/integrations/connections", "_blank");
|
|
302
339
|
},
|
|
303
|
-
children: [/* @__PURE__ */ y(
|
|
340
|
+
children: [/* @__PURE__ */ y(ie, {
|
|
304
341
|
size: 14,
|
|
305
342
|
className: "mr-1.5"
|
|
306
|
-
}),
|
|
343
|
+
}), h("botlit.settings.form.openIntegrations", "Open Integrations")]
|
|
307
344
|
})
|
|
308
345
|
})
|
|
309
346
|
]
|
|
310
347
|
})]
|
|
311
348
|
})
|
|
312
349
|
}), /* @__PURE__ */ y(u, {
|
|
313
|
-
label:
|
|
350
|
+
label: h("botlit.settings.form.connectionIdPlaceholder", "Connection ID"),
|
|
314
351
|
children: /* @__PURE__ */ y(d, {
|
|
315
|
-
placeholder:
|
|
352
|
+
placeholder: h("botlit.settings.form.connectionIdPlaceholder", "Paste connection ID from Integrations..."),
|
|
316
353
|
value: J,
|
|
317
354
|
onChange: (e) => Y(e.target.value)
|
|
318
355
|
})
|
|
319
356
|
})]
|
|
320
357
|
}),
|
|
321
358
|
K === "apikey" && /* @__PURE__ */ y(u, {
|
|
322
|
-
label:
|
|
359
|
+
label: h("botlit.settings.form.apiKeyLabel", "API Key"),
|
|
323
360
|
children: /* @__PURE__ */ y(d, {
|
|
324
361
|
type: "password",
|
|
325
|
-
placeholder:
|
|
362
|
+
placeholder: h("botlit.settings.form.apiKeyPlaceholder", "sk-..."),
|
|
326
363
|
value: R,
|
|
327
364
|
onChange: (e) => z(e.target.value)
|
|
328
365
|
})
|
|
@@ -330,44 +367,42 @@ var k = () => {
|
|
|
330
367
|
/* @__PURE__ */ b("div", {
|
|
331
368
|
className: "flex gap-2",
|
|
332
369
|
children: [/* @__PURE__ */ y(l, {
|
|
333
|
-
leftIcon: /* @__PURE__ */ y(
|
|
334
|
-
isLoading:
|
|
335
|
-
disabled: Q && !
|
|
370
|
+
leftIcon: /* @__PURE__ */ y(C, { size: 16 }),
|
|
371
|
+
isLoading: M,
|
|
372
|
+
disabled: Q && !oe || ($ ? !1 : K === "apikey" ? !R.trim() : !J.trim()),
|
|
336
373
|
onClick: async () => {
|
|
337
374
|
try {
|
|
338
|
-
let e =
|
|
339
|
-
...
|
|
375
|
+
let e = _?.find((e) => e.id === W), t = k(H, e?.name), n = K === "apikey" && R ? { apiKey: R } : void 0, r = K === "integration" ? J : null, i = e?.metadata ?? {}, a = Q ? {
|
|
376
|
+
...i,
|
|
340
377
|
region: X.trim(),
|
|
341
378
|
awsAuthentication: $ ? "iam" : "credentials"
|
|
342
|
-
} :
|
|
343
|
-
W ? await
|
|
344
|
-
name:
|
|
345
|
-
type:
|
|
346
|
-
connectionId:
|
|
347
|
-
credentials:
|
|
348
|
-
metadata:
|
|
379
|
+
} : i;
|
|
380
|
+
W ? await j({
|
|
381
|
+
name: t,
|
|
382
|
+
type: E(H),
|
|
383
|
+
connectionId: r,
|
|
384
|
+
credentials: n,
|
|
385
|
+
metadata: a,
|
|
349
386
|
isActive: B
|
|
350
|
-
}, W) : await
|
|
351
|
-
name:
|
|
352
|
-
type:
|
|
353
|
-
connectionId:
|
|
354
|
-
credentials:
|
|
355
|
-
metadata:
|
|
356
|
-
}), z(""), Y(""), G(null), await
|
|
357
|
-
let a = H.charAt(0).toUpperCase() + H.slice(1);
|
|
358
|
-
E.success(W ? g("botlit.settings.form.updateSuccess", "{{provider}} provider updated successfully", { provider: a }) : g("botlit.settings.form.addSuccess", "{{provider}} provider added successfully", { provider: a }));
|
|
387
|
+
}, W) : await j({
|
|
388
|
+
name: t,
|
|
389
|
+
type: E(H),
|
|
390
|
+
connectionId: r,
|
|
391
|
+
credentials: n,
|
|
392
|
+
metadata: a
|
|
393
|
+
}), z(""), Y(""), G(null), await T(), w.success(W ? h("botlit.settings.form.updateSuccess", "{{provider}} provider updated successfully", { provider: t }) : h("botlit.settings.form.addSuccess", "{{provider}} provider added successfully", { provider: t }));
|
|
359
394
|
} catch (e) {
|
|
360
|
-
let t = e instanceof Error ? e.message :
|
|
361
|
-
|
|
395
|
+
let t = e instanceof Error ? e.message : h("botlit.settings.form.saveError", "Failed to save provider");
|
|
396
|
+
w.error(t);
|
|
362
397
|
}
|
|
363
398
|
},
|
|
364
|
-
children: W ?
|
|
399
|
+
children: W ? h("botlit.settings.form.updateProvider", "Update Provider") : h("botlit.settings.form.saveProvider", "Save Provider")
|
|
365
400
|
}), W && /* @__PURE__ */ y(l, {
|
|
366
401
|
variant: "outline",
|
|
367
402
|
onClick: () => {
|
|
368
403
|
G(null), z(""), Y(""), q("apikey"), U("openai");
|
|
369
404
|
},
|
|
370
|
-
children:
|
|
405
|
+
children: h("botlit.settings.form.cancel", "Cancel")
|
|
371
406
|
})]
|
|
372
407
|
})
|
|
373
408
|
]
|
|
@@ -378,6 +413,6 @@ var k = () => {
|
|
|
378
413
|
})
|
|
379
414
|
});
|
|
380
415
|
};
|
|
381
|
-
export {
|
|
416
|
+
export { j as SettingsPage, O as providerLabel, k as providerNameFor };
|
|
382
417
|
|
|
383
418
|
//# sourceMappingURL=SettingsPage.js.map
|