@burdenoff/microfe-botmanor 2026.813.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 (160) hide show
  1. package/README.md +12 -0
  2. package/dist/botlit/BotlitRoutes.js +357 -0
  3. package/dist/botlit/BotlitRoutes.js.map +1 -0
  4. package/dist/botlit/BotmanorRoot.js +12 -0
  5. package/dist/botlit/BotmanorRoot.js.map +1 -0
  6. package/dist/botlit/BotmanorRootInner.js +101 -0
  7. package/dist/botlit/BotmanorRootInner.js.map +1 -0
  8. package/dist/botlit/components/Badge.js +39 -0
  9. package/dist/botlit/components/Badge.js.map +1 -0
  10. package/dist/botlit/components/Button.js +46 -0
  11. package/dist/botlit/components/Button.js.map +1 -0
  12. package/dist/botlit/components/Card.js +31 -0
  13. package/dist/botlit/components/Card.js.map +1 -0
  14. package/dist/botlit/components/ChannelSelectorSheet.js +130 -0
  15. package/dist/botlit/components/ChannelSelectorSheet.js.map +1 -0
  16. package/dist/botlit/components/EmptyState.js +35 -0
  17. package/dist/botlit/components/EmptyState.js.map +1 -0
  18. package/dist/botlit/components/ErrorState.js +33 -0
  19. package/dist/botlit/components/ErrorState.js.map +1 -0
  20. package/dist/botlit/components/Input.js +59 -0
  21. package/dist/botlit/components/Input.js.map +1 -0
  22. package/dist/botlit/components/PageLayout.js +34 -0
  23. package/dist/botlit/components/PageLayout.js.map +1 -0
  24. package/dist/botlit/components/QuotaExhaustedDialog.js +20 -0
  25. package/dist/botlit/components/QuotaExhaustedDialog.js.map +1 -0
  26. package/dist/botlit/components/RouteLoader.js +52 -0
  27. package/dist/botlit/components/RouteLoader.js.map +1 -0
  28. package/dist/botlit/components/VersionHistoryPanel.js +144 -0
  29. package/dist/botlit/components/VersionHistoryPanel.js.map +1 -0
  30. package/dist/botlit/components/WorkspaceRequired.js +70 -0
  31. package/dist/botlit/components/WorkspaceRequired.js.map +1 -0
  32. package/dist/botlit/hooks/index.js +16 -0
  33. package/dist/botlit/hooks/internal/mutationInput.js +16 -0
  34. package/dist/botlit/hooks/internal/mutationInput.js.map +1 -0
  35. package/dist/botlit/hooks/internal/workspaceGateway.js +99 -0
  36. package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -0
  37. package/dist/botlit/hooks/useA2A.js +184 -0
  38. package/dist/botlit/hooks/useA2A.js.map +1 -0
  39. package/dist/botlit/hooks/useAgents.js +469 -0
  40. package/dist/botlit/hooks/useAgents.js.map +1 -0
  41. package/dist/botlit/hooks/useBots.js +306 -0
  42. package/dist/botlit/hooks/useBots.js.map +1 -0
  43. package/dist/botlit/hooks/useBuckets.js +119 -0
  44. package/dist/botlit/hooks/useBuckets.js.map +1 -0
  45. package/dist/botlit/hooks/useChannels.js +213 -0
  46. package/dist/botlit/hooks/useChannels.js.map +1 -0
  47. package/dist/botlit/hooks/useConversations.js +64 -0
  48. package/dist/botlit/hooks/useConversations.js.map +1 -0
  49. package/dist/botlit/hooks/useExecutions.js +86 -0
  50. package/dist/botlit/hooks/useExecutions.js.map +1 -0
  51. package/dist/botlit/hooks/useKnowledgeBases.js +113 -0
  52. package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -0
  53. package/dist/botlit/hooks/useLLMProviders.js +83 -0
  54. package/dist/botlit/hooks/useLLMProviders.js.map +1 -0
  55. package/dist/botlit/hooks/useMCPServers.js +134 -0
  56. package/dist/botlit/hooks/useMCPServers.js.map +1 -0
  57. package/dist/botlit/hooks/usePolicies.js +120 -0
  58. package/dist/botlit/hooks/usePolicies.js.map +1 -0
  59. package/dist/botlit/hooks/usePromptTemplates.js +161 -0
  60. package/dist/botlit/hooks/usePromptTemplates.js.map +1 -0
  61. package/dist/botlit/hooks/useRetrievalProfiles.js +146 -0
  62. package/dist/botlit/hooks/useRetrievalProfiles.js.map +1 -0
  63. package/dist/botlit/hooks/useSkills.js +132 -0
  64. package/dist/botlit/hooks/useSkills.js.map +1 -0
  65. package/dist/botlit/hooks/useStore.js +167 -0
  66. package/dist/botlit/hooks/useStore.js.map +1 -0
  67. package/dist/botlit/hooks/useUserPlatformConnection.js +172 -0
  68. package/dist/botlit/hooks/useUserPlatformConnection.js.map +1 -0
  69. package/dist/botlit/index.js +11 -0
  70. package/dist/botlit/pages/A2AAgentDetailPage.js +589 -0
  71. package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -0
  72. package/dist/botlit/pages/A2ARegistryPage.js +240 -0
  73. package/dist/botlit/pages/A2ARegistryPage.js.map +1 -0
  74. package/dist/botlit/pages/AgentBuilderPage.js +486 -0
  75. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -0
  76. package/dist/botlit/pages/AgentDetailPage.js +517 -0
  77. package/dist/botlit/pages/AgentDetailPage.js.map +1 -0
  78. package/dist/botlit/pages/AgentsListPage.js +294 -0
  79. package/dist/botlit/pages/AgentsListPage.js.map +1 -0
  80. package/dist/botlit/pages/BotChannelsTab.js +530 -0
  81. package/dist/botlit/pages/BotChannelsTab.js.map +1 -0
  82. package/dist/botlit/pages/BotDetailPage.js +872 -0
  83. package/dist/botlit/pages/BotDetailPage.js.map +1 -0
  84. package/dist/botlit/pages/BotWorkflowTab.js +229 -0
  85. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -0
  86. package/dist/botlit/pages/BotsListPage.js +313 -0
  87. package/dist/botlit/pages/BotsListPage.js.map +1 -0
  88. package/dist/botlit/pages/BucketsPage.js +604 -0
  89. package/dist/botlit/pages/BucketsPage.js.map +1 -0
  90. package/dist/botlit/pages/ChannelDetailPage.js +955 -0
  91. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -0
  92. package/dist/botlit/pages/ChannelRoutesPage.js +218 -0
  93. package/dist/botlit/pages/ChannelRoutesPage.js.map +1 -0
  94. package/dist/botlit/pages/ChannelsPage.js +304 -0
  95. package/dist/botlit/pages/ChannelsPage.js.map +1 -0
  96. package/dist/botlit/pages/ChatPage.js +247 -0
  97. package/dist/botlit/pages/ChatPage.js.map +1 -0
  98. package/dist/botlit/pages/DashboardPage.js +318 -0
  99. package/dist/botlit/pages/DashboardPage.js.map +1 -0
  100. package/dist/botlit/pages/ExecutionDetailPage.js +313 -0
  101. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -0
  102. package/dist/botlit/pages/ExecutionsPage.js +294 -0
  103. package/dist/botlit/pages/ExecutionsPage.js.map +1 -0
  104. package/dist/botlit/pages/InstalledPackagesPage.js +619 -0
  105. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -0
  106. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +473 -0
  107. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -0
  108. package/dist/botlit/pages/KnowledgeBasesPage.js +150 -0
  109. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -0
  110. package/dist/botlit/pages/MCPServerDetailPage.js +550 -0
  111. package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -0
  112. package/dist/botlit/pages/MCPServersPage.js +321 -0
  113. package/dist/botlit/pages/MCPServersPage.js.map +1 -0
  114. package/dist/botlit/pages/PoliciesPage.js +224 -0
  115. package/dist/botlit/pages/PoliciesPage.js.map +1 -0
  116. package/dist/botlit/pages/PolicyDetailPage.js +861 -0
  117. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -0
  118. package/dist/botlit/pages/PromptStudioPage.js +236 -0
  119. package/dist/botlit/pages/PromptStudioPage.js.map +1 -0
  120. package/dist/botlit/pages/PromptTemplateDetailPage.js +812 -0
  121. package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -0
  122. package/dist/botlit/pages/PromptTemplatesPage.js +269 -0
  123. package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -0
  124. package/dist/botlit/pages/RetrievalProfileDetailPage.js +559 -0
  125. package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -0
  126. package/dist/botlit/pages/RetrievalProfilesPage.js +219 -0
  127. package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -0
  128. package/dist/botlit/pages/SettingsPage.js +655 -0
  129. package/dist/botlit/pages/SettingsPage.js.map +1 -0
  130. package/dist/botlit/pages/SkillDetailPage.js +778 -0
  131. package/dist/botlit/pages/SkillDetailPage.js.map +1 -0
  132. package/dist/botlit/pages/SkillsPage.js +206 -0
  133. package/dist/botlit/pages/SkillsPage.js.map +1 -0
  134. package/dist/botlit/pages/StorePackageDetailPage.js +462 -0
  135. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -0
  136. package/dist/botlit/pages/StorePage.js +315 -0
  137. package/dist/botlit/pages/StorePage.js.map +1 -0
  138. package/dist/botlit/providers/BotlitProvider.js +93 -0
  139. package/dist/botlit/providers/BotlitProvider.js.map +1 -0
  140. package/dist/botlit/store/botlitStore.js +101 -0
  141. package/dist/botlit/store/botlitStore.js.map +1 -0
  142. package/dist/botlit/utils/cn.js +10 -0
  143. package/dist/botlit/utils/cn.js.map +1 -0
  144. package/dist/botlit/utils/formatters.js +37 -0
  145. package/dist/botlit/utils/formatters.js.map +1 -0
  146. package/dist/botlit/utils/navigation.js +9 -0
  147. package/dist/botlit/utils/navigation.js.map +1 -0
  148. package/dist/botlit/utils/unions.js +14 -0
  149. package/dist/botlit/utils/unions.js.map +1 -0
  150. package/dist/generated/global-operations.js +66 -0
  151. package/dist/generated/global-operations.js.map +1 -0
  152. package/dist/generated/global-types.js +8 -0
  153. package/dist/generated/global-types.js.map +1 -0
  154. package/dist/generated/wspace-operations.js +1591 -0
  155. package/dist/generated/wspace-operations.js.map +1 -0
  156. package/dist/generated/wspace-types.js +12 -0
  157. package/dist/generated/wspace-types.js.map +1 -0
  158. package/dist/index.js +13 -0
  159. package/dist/utils/nativeBridge.js +2 -0
  160. package/package.json +133 -0
@@ -0,0 +1,655 @@
1
+ import { useConfigureLLMProvider as e, useLLMModels as t, useLLMProviders as n } from "../hooks/useLLMProviders.js";
2
+ import { cn as r } from "../utils/cn.js";
3
+ import { PageLayout as i } from "../components/PageLayout.js";
4
+ import { Card as a, CardContent as o, CardDescription as s, CardHeader as c, CardTitle as l } from "../components/Card.js";
5
+ import { Button as u } from "../components/Button.js";
6
+ import { Badge as d } from "../components/Badge.js";
7
+ import { FormField as f, Input as p } from "../components/Input.js";
8
+ import { toUnion as m } from "../utils/unions.js";
9
+ import { useState as h } from "react";
10
+ import { PagePurpose as g } from "@burdenoff/fe-libs/ui";
11
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
12
+ import { Bell as b, Brain as x, Database as S, ExternalLink as C, Key as w, Link2 as T, Palette as E, Save as D, Shield as O } from "lucide-react";
13
+ import { toast as k } from "sonner";
14
+ import { useTheme as A } from "@burdenoff/fe-libs/shared/providers/shell";
15
+ //#region src/botlit/pages/SettingsPage.tsx
16
+ var j = [
17
+ "OPENAI",
18
+ "ANTHROPIC",
19
+ "GOOGLE",
20
+ "AZURE_OPENAI",
21
+ "AWS_BEDROCK",
22
+ "CUSTOM"
23
+ ];
24
+ function M(e) {
25
+ return m(e.toUpperCase(), j, "CUSTOM");
26
+ }
27
+ var N = () => {
28
+ let { data: m, refetch: j } = n(), { configureProvider: N, isConfiguring: P } = e(), { data: F } = t(), { mode: ee, setMode: I } = A(), [L, R] = h("providers"), [z, B] = h(""), [V, H] = h("openai"), [U, W] = h(null), [G, K] = h("apikey"), [q, J] = h(""), [Y, X] = h(""), [Z, Q] = h(""), [te, ne] = h("128000"), [re, ie] = h("4096"), [ae, oe] = h("2.5"), [$, se] = h("10"), [ce, le] = h("");
29
+ return /* @__PURE__ */ v(i, {
30
+ title: "Settings",
31
+ description: "Configure your Botlit workspace settings",
32
+ children: /* @__PURE__ */ y("div", {
33
+ className: "space-y-6",
34
+ children: [/* @__PURE__ */ v(g, {
35
+ icon: /* @__PURE__ */ v(w, { size: 18 }),
36
+ children: "Workspace-wide settings that affect every bot and agent you build. The most important is LLM Providers — connect at least one model provider (OpenAI, Anthropic, Google and others) so your agents have a brain to think with. From here you also manage models, notifications, security keys, storage retention and appearance."
37
+ }), /* @__PURE__ */ y("div", {
38
+ className: "grid grid-cols-12 gap-6",
39
+ children: [/* @__PURE__ */ v("div", {
40
+ className: "col-span-3",
41
+ children: /* @__PURE__ */ v(a, { children: /* @__PURE__ */ v(o, {
42
+ className: "p-2",
43
+ children: [
44
+ {
45
+ id: "providers",
46
+ label: "LLM Providers",
47
+ icon: /* @__PURE__ */ v(w, { size: 16 })
48
+ },
49
+ {
50
+ id: "notifications",
51
+ label: "Notifications",
52
+ icon: /* @__PURE__ */ v(b, { size: 16 })
53
+ },
54
+ {
55
+ id: "security",
56
+ label: "Security",
57
+ icon: /* @__PURE__ */ v(O, { size: 16 })
58
+ },
59
+ {
60
+ id: "storage",
61
+ label: "Storage",
62
+ icon: /* @__PURE__ */ v(S, { size: 16 })
63
+ },
64
+ {
65
+ id: "appearance",
66
+ label: "Appearance",
67
+ icon: /* @__PURE__ */ v(E, { size: 16 })
68
+ }
69
+ ].map((e) => /* @__PURE__ */ y("button", {
70
+ onClick: () => R(e.id),
71
+ className: r("w-full flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-colors", L === e.id ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
72
+ children: [e.icon, /* @__PURE__ */ v("span", {
73
+ className: "font-medium",
74
+ children: e.label
75
+ })]
76
+ }, e.id))
77
+ }) })
78
+ }), /* @__PURE__ */ y("div", {
79
+ className: "col-span-9 space-y-6",
80
+ children: [
81
+ L === "providers" && /* @__PURE__ */ y(_, { children: [
82
+ /* @__PURE__ */ y(a, {
83
+ treatment: "glass",
84
+ glow: !0,
85
+ children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "LLM Providers" }), /* @__PURE__ */ v(s, { children: "Configure API keys for AI model providers" })] }), /* @__PURE__ */ v(o, {
86
+ className: "space-y-4",
87
+ children: m?.map((e) => /* @__PURE__ */ y("div", {
88
+ className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg",
89
+ children: [/* @__PURE__ */ y("div", {
90
+ className: "flex items-center gap-4",
91
+ children: [/* @__PURE__ */ v("div", {
92
+ className: "p-2 bg-action-primary-bg/10 rounded-lg",
93
+ children: e.connectionId ? /* @__PURE__ */ v(T, { className: "h-5 w-5 text-primary" }) : /* @__PURE__ */ v(w, { className: "h-5 w-5 text-primary" })
94
+ }), /* @__PURE__ */ y("div", { children: [
95
+ /* @__PURE__ */ v("p", {
96
+ className: "font-medium",
97
+ children: e.name
98
+ }),
99
+ /* @__PURE__ */ y("p", {
100
+ className: "text-sm text-text-secondary",
101
+ children: ["Type: ", e.type]
102
+ }),
103
+ e.connectionId && /* @__PURE__ */ v("p", {
104
+ className: "text-xs text-text-secondary mt-0.5",
105
+ children: "Connected via Integrations"
106
+ }),
107
+ !e.connectionId && e.credentialsHash && /* @__PURE__ */ v("p", {
108
+ className: "text-xs text-text-secondary mt-0.5",
109
+ children: "API key stored locally"
110
+ })
111
+ ] })]
112
+ }), /* @__PURE__ */ y("div", {
113
+ className: "flex items-center gap-3",
114
+ children: [
115
+ e.connectionId && /* @__PURE__ */ v(d, {
116
+ variant: "default",
117
+ children: "Integration"
118
+ }),
119
+ /* @__PURE__ */ v(d, {
120
+ variant: e.isActive ? "success" : "secondary",
121
+ children: e.isActive ? "Active" : "Inactive"
122
+ }),
123
+ /* @__PURE__ */ v(u, {
124
+ variant: "outline",
125
+ size: "sm",
126
+ onClick: () => {
127
+ W(e.id), H(e.type.toLowerCase()), B(""), J(e.connectionId || ""), K(e.connectionId ? "integration" : "apikey"), document.getElementById("provider-form")?.scrollIntoView({ behavior: "smooth" });
128
+ },
129
+ children: "Configure"
130
+ })
131
+ ]
132
+ })]
133
+ }, e.id))
134
+ })]
135
+ }),
136
+ /* @__PURE__ */ y(a, { children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "LLM Models" }), /* @__PURE__ */ v(s, { children: "Registered models across your providers" })] }), /* @__PURE__ */ v(o, {
137
+ className: "space-y-4",
138
+ children: F && F.length > 0 ? F.map((e) => {
139
+ let t = m?.find((t) => t.id === e.providerId)?.name;
140
+ return /* @__PURE__ */ y("div", {
141
+ className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg",
142
+ children: [/* @__PURE__ */ y("div", {
143
+ className: "flex items-center gap-4",
144
+ children: [/* @__PURE__ */ v("div", {
145
+ className: "p-2 bg-purple-500/10 rounded-lg",
146
+ children: /* @__PURE__ */ v(x, { className: "h-5 w-5 text-purple-500" })
147
+ }), /* @__PURE__ */ y("div", { children: [
148
+ /* @__PURE__ */ v("p", {
149
+ className: "font-medium",
150
+ children: e.name
151
+ }),
152
+ /* @__PURE__ */ y("p", {
153
+ className: "text-sm text-text-secondary",
154
+ children: [e.modelId, t && ` · ${t}`]
155
+ }),
156
+ /* @__PURE__ */ y("div", {
157
+ className: "flex gap-3 mt-1 text-xs text-text-secondary",
158
+ children: [
159
+ e.contextWindow != null && /* @__PURE__ */ y("span", { children: [
160
+ "Context: ",
161
+ (e.contextWindow / 1e3).toFixed(0),
162
+ "K"
163
+ ] }),
164
+ e.maxOutputTokens != null && /* @__PURE__ */ y("span", { children: [
165
+ "Max out: ",
166
+ (e.maxOutputTokens / 1e3).toFixed(0),
167
+ "K"
168
+ ] }),
169
+ e.inputPricePerMToken != null && /* @__PURE__ */ y("span", { children: [
170
+ "$",
171
+ e.inputPricePerMToken,
172
+ "/M in"
173
+ ] }),
174
+ e.outputPricePerMToken != null && /* @__PURE__ */ y("span", { children: [
175
+ "$",
176
+ e.outputPricePerMToken,
177
+ "/M out"
178
+ ] })
179
+ ]
180
+ })
181
+ ] })]
182
+ }), /* @__PURE__ */ v(d, {
183
+ variant: e.isActive ? "success" : "secondary",
184
+ children: e.isActive ? "Active" : "Inactive"
185
+ })]
186
+ }, e.id);
187
+ }) : /* @__PURE__ */ v("p", {
188
+ className: "text-sm text-text-secondary text-center py-4",
189
+ children: "No models registered yet. Add a model below."
190
+ })
191
+ })] }),
192
+ /* @__PURE__ */ y(a, {
193
+ id: "provider-form",
194
+ children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: U ? "Update Provider" : "Add Provider" }), /* @__PURE__ */ v(s, { children: U ? "Update credentials for this provider" : "Configure a new LLM provider" })] }), /* @__PURE__ */ y(o, {
195
+ className: "space-y-4",
196
+ children: [
197
+ /* @__PURE__ */ v(f, {
198
+ label: "Provider",
199
+ children: /* @__PURE__ */ y("select", {
200
+ className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
201
+ value: V,
202
+ onChange: (e) => H(e.target.value),
203
+ children: [
204
+ /* @__PURE__ */ v("option", {
205
+ value: "openai",
206
+ children: "OpenAI"
207
+ }),
208
+ /* @__PURE__ */ v("option", {
209
+ value: "anthropic",
210
+ children: "Anthropic"
211
+ }),
212
+ /* @__PURE__ */ v("option", {
213
+ value: "google",
214
+ children: "Google AI"
215
+ }),
216
+ /* @__PURE__ */ v("option", {
217
+ value: "azure_openai",
218
+ children: "Azure OpenAI"
219
+ }),
220
+ /* @__PURE__ */ v("option", {
221
+ value: "aws_bedrock",
222
+ children: "AWS Bedrock"
223
+ }),
224
+ /* @__PURE__ */ v("option", {
225
+ value: "custom",
226
+ children: "Custom"
227
+ })
228
+ ]
229
+ })
230
+ }),
231
+ /* @__PURE__ */ v(f, {
232
+ label: "Credential Method",
233
+ children: /* @__PURE__ */ y("div", {
234
+ className: "flex gap-3",
235
+ children: [/* @__PURE__ */ y("label", {
236
+ className: r("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer transition-colors flex-1", G === "integration" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
237
+ children: [/* @__PURE__ */ v("input", {
238
+ type: "radio",
239
+ name: "credentialMethod",
240
+ value: "integration",
241
+ checked: G === "integration",
242
+ onChange: () => K("integration"),
243
+ className: "h-4 w-4"
244
+ }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
245
+ className: "font-medium text-sm",
246
+ children: "Connect via Integrations"
247
+ }), /* @__PURE__ */ v("p", {
248
+ className: "text-xs text-text-secondary",
249
+ children: "Managed credentials (recommended)"
250
+ })] })]
251
+ }), /* @__PURE__ */ y("label", {
252
+ className: r("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer transition-colors flex-1", G === "apikey" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
253
+ children: [/* @__PURE__ */ v("input", {
254
+ type: "radio",
255
+ name: "credentialMethod",
256
+ value: "apikey",
257
+ checked: G === "apikey",
258
+ onChange: () => K("apikey"),
259
+ className: "h-4 w-4"
260
+ }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
261
+ className: "font-medium text-sm",
262
+ children: "Enter API Key"
263
+ }), /* @__PURE__ */ v("p", {
264
+ className: "text-xs text-text-secondary",
265
+ children: "Paste key directly (legacy)"
266
+ })] })]
267
+ })]
268
+ })
269
+ }),
270
+ G === "integration" && /* @__PURE__ */ y("div", {
271
+ className: "space-y-3",
272
+ children: [/* @__PURE__ */ v("div", {
273
+ className: "p-4 bg-bg-sunken/50 border border-border-subtle rounded-lg",
274
+ children: /* @__PURE__ */ y("div", {
275
+ className: "flex items-start gap-3",
276
+ children: [/* @__PURE__ */ v(T, { className: "h-5 w-5 text-primary mt-0.5 flex-shrink-0" }), /* @__PURE__ */ y("div", {
277
+ className: "space-y-2 flex-1",
278
+ children: [
279
+ /* @__PURE__ */ v("p", {
280
+ className: "text-sm font-medium",
281
+ children: "Integration Connection"
282
+ }),
283
+ /* @__PURE__ */ v("p", {
284
+ className: "text-xs text-text-secondary",
285
+ children: "Create a connection in the Integrations module, then paste the Connection ID here. This stores your API key securely in the Integrations vault."
286
+ }),
287
+ /* @__PURE__ */ v("div", {
288
+ className: "flex gap-2 mt-2",
289
+ children: /* @__PURE__ */ y(u, {
290
+ variant: "outline",
291
+ size: "sm",
292
+ onClick: () => {
293
+ window.open("/integrations/connections", "_blank");
294
+ },
295
+ children: [/* @__PURE__ */ v(C, {
296
+ size: 14,
297
+ className: "mr-1.5"
298
+ }), "Open Integrations"]
299
+ })
300
+ })
301
+ ]
302
+ })]
303
+ })
304
+ }), /* @__PURE__ */ v(f, {
305
+ label: "Connection ID",
306
+ children: /* @__PURE__ */ v(p, {
307
+ placeholder: "Paste connection ID from Integrations...",
308
+ value: q,
309
+ onChange: (e) => J(e.target.value)
310
+ })
311
+ })]
312
+ }),
313
+ G === "apikey" && /* @__PURE__ */ v(f, {
314
+ label: "API Key",
315
+ children: /* @__PURE__ */ v(p, {
316
+ type: "password",
317
+ placeholder: "sk-...",
318
+ value: z,
319
+ onChange: (e) => B(e.target.value)
320
+ })
321
+ }),
322
+ /* @__PURE__ */ y("div", {
323
+ className: "flex gap-2",
324
+ children: [/* @__PURE__ */ v(u, {
325
+ leftIcon: /* @__PURE__ */ v(D, { size: 16 }),
326
+ isLoading: P,
327
+ disabled: G === "apikey" ? !z : !q,
328
+ onClick: async () => {
329
+ try {
330
+ let e = V.charAt(0).toUpperCase() + V.slice(1), t = G === "integration" ? void 0 : z ? { apiKey: z } : void 0, n = G === "integration" ? q : void 0;
331
+ U ? await N({
332
+ name: e,
333
+ type: M(V),
334
+ connectionId: n,
335
+ credentials: t
336
+ }, U) : await N({
337
+ name: e,
338
+ type: M(V),
339
+ connectionId: n,
340
+ credentials: t
341
+ }), B(""), J(""), W(null), await j();
342
+ let r = V.charAt(0).toUpperCase() + V.slice(1);
343
+ k.success(U ? `${r} provider updated successfully` : `${r} provider added successfully`);
344
+ } catch (e) {
345
+ let t = e instanceof Error ? e.message : "Failed to save provider";
346
+ k.error(t);
347
+ }
348
+ },
349
+ children: U ? "Update Provider" : "Save Provider"
350
+ }), U && /* @__PURE__ */ v(u, {
351
+ variant: "outline",
352
+ onClick: () => {
353
+ W(null), B(""), J(""), K("apikey"), H("openai");
354
+ },
355
+ children: "Cancel"
356
+ })]
357
+ })
358
+ ]
359
+ })]
360
+ }),
361
+ /* @__PURE__ */ y(a, { children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "Add Model" }), /* @__PURE__ */ v(s, { children: "Register a new LLM model for an existing provider" })] }), /* @__PURE__ */ y(o, {
362
+ className: "space-y-4",
363
+ children: [
364
+ /* @__PURE__ */ v(f, {
365
+ label: "Provider",
366
+ children: /* @__PURE__ */ y("select", {
367
+ className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
368
+ value: ce,
369
+ onChange: (e) => le(e.target.value),
370
+ children: [/* @__PURE__ */ v("option", {
371
+ value: "",
372
+ children: "Select a provider..."
373
+ }), m?.map((e) => /* @__PURE__ */ v("option", {
374
+ value: e.id,
375
+ children: e.name
376
+ }, e.id))]
377
+ })
378
+ }),
379
+ /* @__PURE__ */ v(f, {
380
+ label: "Model Name",
381
+ children: /* @__PURE__ */ v(p, {
382
+ placeholder: "e.g., GPT-4o",
383
+ value: Y,
384
+ onChange: (e) => X(e.target.value)
385
+ })
386
+ }),
387
+ /* @__PURE__ */ v(f, {
388
+ label: "Model ID",
389
+ children: /* @__PURE__ */ v(p, {
390
+ placeholder: "e.g., gpt-4o",
391
+ value: Z,
392
+ onChange: (e) => Q(e.target.value)
393
+ })
394
+ }),
395
+ /* @__PURE__ */ y("div", {
396
+ className: "grid grid-cols-2 gap-4",
397
+ children: [/* @__PURE__ */ v(f, {
398
+ label: "Context Window",
399
+ children: /* @__PURE__ */ v(p, {
400
+ type: "number",
401
+ value: te,
402
+ onChange: (e) => ne(e.target.value)
403
+ })
404
+ }), /* @__PURE__ */ v(f, {
405
+ label: "Max Output Tokens",
406
+ children: /* @__PURE__ */ v(p, {
407
+ type: "number",
408
+ value: re,
409
+ onChange: (e) => ie(e.target.value)
410
+ })
411
+ })]
412
+ }),
413
+ /* @__PURE__ */ y("div", {
414
+ className: "grid grid-cols-2 gap-4",
415
+ children: [/* @__PURE__ */ v(f, {
416
+ label: "Input Price / 1M tokens",
417
+ children: /* @__PURE__ */ v(p, {
418
+ type: "number",
419
+ step: "0.01",
420
+ value: ae,
421
+ onChange: (e) => oe(e.target.value)
422
+ })
423
+ }), /* @__PURE__ */ v(f, {
424
+ label: "Output Price / 1M tokens",
425
+ children: /* @__PURE__ */ v(p, {
426
+ type: "number",
427
+ step: "0.01",
428
+ value: $,
429
+ onChange: (e) => se(e.target.value)
430
+ })
431
+ })]
432
+ }),
433
+ /* @__PURE__ */ v(u, {
434
+ leftIcon: /* @__PURE__ */ v(D, { size: 16 }),
435
+ disabled: !0,
436
+ onClick: async () => {
437
+ k.error("Model creation not yet implemented");
438
+ },
439
+ children: "Add Model"
440
+ })
441
+ ]
442
+ })] })
443
+ ] }),
444
+ L === "notifications" && /* @__PURE__ */ y(a, { children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "Notification Settings" }), /* @__PURE__ */ v(s, { children: "Configure how you receive notifications" })] }), /* @__PURE__ */ v(o, {
445
+ className: "space-y-4",
446
+ children: [
447
+ {
448
+ label: "Agent errors",
449
+ description: "Get notified when an agent encounters an error"
450
+ },
451
+ {
452
+ label: "High usage alerts",
453
+ description: "Alerts when token usage exceeds thresholds"
454
+ },
455
+ {
456
+ label: "Weekly reports",
457
+ description: "Receive weekly usage summaries"
458
+ },
459
+ {
460
+ label: "New conversation",
461
+ description: "Notify when a new conversation starts"
462
+ }
463
+ ].map((e) => /* @__PURE__ */ y("label", {
464
+ className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg cursor-pointer",
465
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
466
+ className: "font-medium",
467
+ children: e.label
468
+ }), /* @__PURE__ */ v("p", {
469
+ className: "text-sm text-text-secondary",
470
+ children: e.description
471
+ })] }), /* @__PURE__ */ v("input", {
472
+ type: "checkbox",
473
+ className: "h-5 w-5 rounded",
474
+ defaultChecked: !0
475
+ })]
476
+ }, e.label))
477
+ })] }),
478
+ L === "security" && /* @__PURE__ */ y(a, { children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "Security Settings" }), /* @__PURE__ */ v(s, { children: "Manage security and access controls" })] }), /* @__PURE__ */ y(o, {
479
+ className: "space-y-4",
480
+ children: [
481
+ /* @__PURE__ */ v(f, {
482
+ label: "API Key",
483
+ children: /* @__PURE__ */ y("div", {
484
+ className: "flex gap-2",
485
+ children: [/* @__PURE__ */ v(p, {
486
+ type: "password",
487
+ value: "••••••••••••••••",
488
+ readOnly: !0
489
+ }), /* @__PURE__ */ v(u, {
490
+ variant: "outline",
491
+ children: "Regenerate"
492
+ })]
493
+ })
494
+ }),
495
+ /* @__PURE__ */ v(f, {
496
+ label: "Webhook Secret",
497
+ children: /* @__PURE__ */ y("div", {
498
+ className: "flex gap-2",
499
+ children: [/* @__PURE__ */ v(p, {
500
+ type: "password",
501
+ value: "••••••••••••••••",
502
+ readOnly: !0
503
+ }), /* @__PURE__ */ v(u, {
504
+ variant: "outline",
505
+ children: "Regenerate"
506
+ })]
507
+ })
508
+ }),
509
+ /* @__PURE__ */ v(f, {
510
+ label: "Allowed Origins (CORS)",
511
+ children: /* @__PURE__ */ v(p, { placeholder: "https://example.com" })
512
+ })
513
+ ]
514
+ })] }),
515
+ L === "storage" && /* @__PURE__ */ y(a, { children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "Storage Settings" }), /* @__PURE__ */ v(s, { children: "Configure data storage and retention" })] }), /* @__PURE__ */ y(o, {
516
+ className: "space-y-4",
517
+ children: [/* @__PURE__ */ y("div", {
518
+ className: "grid grid-cols-3 gap-4",
519
+ children: [
520
+ /* @__PURE__ */ y("div", {
521
+ className: "p-4 bg-bg-sunken rounded-lg text-center",
522
+ children: [/* @__PURE__ */ v("p", {
523
+ className: "text-2xl font-bold",
524
+ children: "45.2 GB"
525
+ }), /* @__PURE__ */ v("p", {
526
+ className: "text-sm text-text-secondary",
527
+ children: "Total Storage"
528
+ })]
529
+ }),
530
+ /* @__PURE__ */ y("div", {
531
+ className: "p-4 bg-bg-sunken rounded-lg text-center",
532
+ children: [/* @__PURE__ */ v("p", {
533
+ className: "text-2xl font-bold",
534
+ children: "12.8 GB"
535
+ }), /* @__PURE__ */ v("p", {
536
+ className: "text-sm text-text-secondary",
537
+ children: "Conversations"
538
+ })]
539
+ }),
540
+ /* @__PURE__ */ y("div", {
541
+ className: "p-4 bg-bg-sunken rounded-lg text-center",
542
+ children: [/* @__PURE__ */ v("p", {
543
+ className: "text-2xl font-bold",
544
+ children: "32.4 GB"
545
+ }), /* @__PURE__ */ v("p", {
546
+ className: "text-sm text-text-secondary",
547
+ children: "Knowledge Bases"
548
+ })]
549
+ })
550
+ ]
551
+ }), /* @__PURE__ */ v(f, {
552
+ label: "Conversation Retention",
553
+ children: /* @__PURE__ */ y("select", {
554
+ className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
555
+ children: [
556
+ /* @__PURE__ */ v("option", {
557
+ value: "30",
558
+ children: "30 days"
559
+ }),
560
+ /* @__PURE__ */ v("option", {
561
+ value: "90",
562
+ children: "90 days"
563
+ }),
564
+ /* @__PURE__ */ v("option", {
565
+ value: "180",
566
+ children: "180 days"
567
+ }),
568
+ /* @__PURE__ */ v("option", {
569
+ value: "365",
570
+ children: "1 year"
571
+ }),
572
+ /* @__PURE__ */ v("option", {
573
+ value: "forever",
574
+ children: "Forever"
575
+ })
576
+ ]
577
+ })
578
+ })]
579
+ })] }),
580
+ L === "appearance" && /* @__PURE__ */ y(a, { children: [/* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(l, { children: "Appearance Settings" }), /* @__PURE__ */ v(s, { children: "Customize the look and feel" })] }), /* @__PURE__ */ y(o, {
581
+ className: "space-y-4",
582
+ children: [
583
+ /* @__PURE__ */ v(f, {
584
+ label: "Theme",
585
+ children: /* @__PURE__ */ v("div", {
586
+ className: "flex gap-4",
587
+ children: [
588
+ "light",
589
+ "dark",
590
+ "system"
591
+ ].map((e) => /* @__PURE__ */ y("label", {
592
+ className: "flex items-center gap-2 cursor-pointer",
593
+ children: [/* @__PURE__ */ v("input", {
594
+ type: "radio",
595
+ name: "theme",
596
+ value: e,
597
+ checked: ee === e,
598
+ onChange: () => I(e),
599
+ className: "h-4 w-4"
600
+ }), /* @__PURE__ */ v("span", {
601
+ className: "capitalize",
602
+ children: e
603
+ })]
604
+ }, e))
605
+ })
606
+ }),
607
+ /* @__PURE__ */ v(f, {
608
+ label: "Accent Color",
609
+ children: /* @__PURE__ */ v("div", {
610
+ className: "flex gap-2",
611
+ children: [
612
+ "#3b82f6",
613
+ "#8b5cf6",
614
+ "#22c55e",
615
+ "#f59e0b",
616
+ "#ef4444",
617
+ "#ec4899"
618
+ ].map((e) => /* @__PURE__ */ v("button", {
619
+ className: "h-8 w-8 rounded-full border-2 border-transparent hover:border-foreground",
620
+ style: { backgroundColor: e }
621
+ }, e))
622
+ })
623
+ }),
624
+ /* @__PURE__ */ v(f, {
625
+ label: "Font Size",
626
+ children: /* @__PURE__ */ y("select", {
627
+ className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
628
+ children: [
629
+ /* @__PURE__ */ v("option", {
630
+ value: "sm",
631
+ children: "Small"
632
+ }),
633
+ /* @__PURE__ */ v("option", {
634
+ value: "md",
635
+ children: "Medium"
636
+ }),
637
+ /* @__PURE__ */ v("option", {
638
+ value: "lg",
639
+ children: "Large"
640
+ })
641
+ ]
642
+ })
643
+ })
644
+ ]
645
+ })] })
646
+ ]
647
+ })]
648
+ })]
649
+ })
650
+ });
651
+ };
652
+ //#endregion
653
+ export { N as SettingsPage };
654
+
655
+ //# sourceMappingURL=SettingsPage.js.map