@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.
Files changed (135) hide show
  1. package/dist/botlit/BotlitRoutes.js +0 -1
  2. package/dist/botlit/BotlitRoutes.js.map +1 -1
  3. package/dist/botlit/BotmanorRootInner.js +38 -41
  4. package/dist/botlit/BotmanorRootInner.js.map +1 -1
  5. package/dist/botlit/components/A2ACardVerificationCard.js +0 -1
  6. package/dist/botlit/components/A2ACardVerificationCard.js.map +1 -1
  7. package/dist/botlit/components/AgentA2APanel.js +20 -21
  8. package/dist/botlit/components/AgentA2APanel.js.map +1 -1
  9. package/dist/botlit/components/AgentApprovalPanel.js +22 -23
  10. package/dist/botlit/components/AgentApprovalPanel.js.map +1 -1
  11. package/dist/botlit/components/AgentBindingsPanel.js +66 -68
  12. package/dist/botlit/components/AgentBindingsPanel.js.map +1 -1
  13. package/dist/botlit/components/AiOperationsPanel.js +34 -35
  14. package/dist/botlit/components/AiOperationsPanel.js.map +1 -1
  15. package/dist/botlit/components/BotAgentsPanel.js +59 -60
  16. package/dist/botlit/components/BotAgentsPanel.js.map +1 -1
  17. package/dist/botlit/components/BotVersionHistoryPanel.js +19 -20
  18. package/dist/botlit/components/BotVersionHistoryPanel.js.map +1 -1
  19. package/dist/botlit/components/BucketDialogs.js +0 -1
  20. package/dist/botlit/components/BucketDialogs.js.map +1 -1
  21. package/dist/botlit/components/ChannelRoutesPanel.js +82 -84
  22. package/dist/botlit/components/ChannelRoutesPanel.js.map +1 -1
  23. package/dist/botlit/components/CreateChannelRouteDialog.js +4 -5
  24. package/dist/botlit/components/CreateChannelRouteDialog.js.map +1 -1
  25. package/dist/botlit/components/DescribeBotDialog.js +0 -1
  26. package/dist/botlit/components/DescribeBotDialog.js.map +1 -1
  27. package/dist/botlit/components/GettingStartedChecklist.js +9 -10
  28. package/dist/botlit/components/GettingStartedChecklist.js.map +1 -1
  29. package/dist/botlit/components/HandoffConfigPanel.js +0 -1
  30. package/dist/botlit/components/HandoffConfigPanel.js.map +1 -1
  31. package/dist/botlit/components/RetentionStatusPanel.js +10 -12
  32. package/dist/botlit/components/RetentionStatusPanel.js.map +1 -1
  33. package/dist/botlit/components/StewardApprovalsInbox.js +201 -212
  34. package/dist/botlit/components/StewardApprovalsInbox.js.map +1 -1
  35. package/dist/botlit/components/StoreOwnPackagesCard.js +21 -22
  36. package/dist/botlit/components/StoreOwnPackagesCard.js.map +1 -1
  37. package/dist/botlit/components/StorePackageDraftCard.js +38 -39
  38. package/dist/botlit/components/StorePackageDraftCard.js.map +1 -1
  39. package/dist/botlit/components/StorePolicyBundleCard.js +27 -29
  40. package/dist/botlit/components/StorePolicyBundleCard.js.map +1 -1
  41. package/dist/botlit/components/StoreSubmissionsCard.js +64 -65
  42. package/dist/botlit/components/StoreSubmissionsCard.js.map +1 -1
  43. package/dist/botlit/components/VersionHistoryPanel.js +18 -19
  44. package/dist/botlit/components/VersionHistoryPanel.js.map +1 -1
  45. package/dist/botlit/hooks/internal/workspaceGateway.d.ts +6 -0
  46. package/dist/botlit/hooks/internal/workspaceGateway.js +40 -40
  47. package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -1
  48. package/dist/botlit/hooks/useToolApprovals.d.ts +8 -3
  49. package/dist/botlit/hooks/useToolApprovals.js +68 -73
  50. package/dist/botlit/hooks/useToolApprovals.js.map +1 -1
  51. package/dist/botlit/pages/A2AAgentDetailPage.js +331 -332
  52. package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
  53. package/dist/botlit/pages/A2ARegistryPage.js +39 -41
  54. package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
  55. package/dist/botlit/pages/AgentApprovalsPage.js +24 -25
  56. package/dist/botlit/pages/AgentApprovalsPage.js.map +1 -1
  57. package/dist/botlit/pages/AgentBuilderPage.js +470 -471
  58. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
  59. package/dist/botlit/pages/AgentDetailPage.js +68 -69
  60. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  61. package/dist/botlit/pages/AgentsListPage.js +277 -278
  62. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  63. package/dist/botlit/pages/AiOperationsPage.js +44 -46
  64. package/dist/botlit/pages/AiOperationsPage.js.map +1 -1
  65. package/dist/botlit/pages/BotChannelsTab.js +354 -356
  66. package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
  67. package/dist/botlit/pages/BotDetailPage.js +138 -139
  68. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  69. package/dist/botlit/pages/BotWorkflowTab.js +23 -24
  70. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
  71. package/dist/botlit/pages/BotsListPage.js +32 -33
  72. package/dist/botlit/pages/BotsListPage.js.map +1 -1
  73. package/dist/botlit/pages/BucketDetailPage.js +110 -112
  74. package/dist/botlit/pages/BucketDetailPage.js.map +1 -1
  75. package/dist/botlit/pages/BucketsPage.js +115 -117
  76. package/dist/botlit/pages/BucketsPage.js.map +1 -1
  77. package/dist/botlit/pages/ChannelDetailPage.js +105 -107
  78. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
  79. package/dist/botlit/pages/ChannelsPage.js +38 -40
  80. package/dist/botlit/pages/ChannelsPage.js.map +1 -1
  81. package/dist/botlit/pages/DashboardPage.js +26 -27
  82. package/dist/botlit/pages/DashboardPage.js.map +1 -1
  83. package/dist/botlit/pages/ExecutionDetailPage.js +70 -71
  84. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
  85. package/dist/botlit/pages/ExecutionsPage.js +219 -220
  86. package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
  87. package/dist/botlit/pages/HandoffsPage.js +208 -210
  88. package/dist/botlit/pages/HandoffsPage.js.map +1 -1
  89. package/dist/botlit/pages/InstalledPackagesPage.js +179 -181
  90. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
  91. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +194 -195
  92. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
  93. package/dist/botlit/pages/KnowledgeBasesPage.js +38 -39
  94. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
  95. package/dist/botlit/pages/MCPServerDetailPage.js +178 -180
  96. package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -1
  97. package/dist/botlit/pages/MCPServersPage.js +42 -43
  98. package/dist/botlit/pages/MCPServersPage.js.map +1 -1
  99. package/dist/botlit/pages/PoliciesPage.js +77 -78
  100. package/dist/botlit/pages/PoliciesPage.js.map +1 -1
  101. package/dist/botlit/pages/PolicyDetailPage.js +517 -519
  102. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
  103. package/dist/botlit/pages/PromptStudioPage.js +81 -83
  104. package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
  105. package/dist/botlit/pages/PromptTemplateDetailPage.js +137 -139
  106. package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
  107. package/dist/botlit/pages/PromptTemplatesPage.js +28 -30
  108. package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
  109. package/dist/botlit/pages/RetrievalProfileDetailPage.js +64 -65
  110. package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -1
  111. package/dist/botlit/pages/RetrievalProfilesPage.js +59 -60
  112. package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
  113. package/dist/botlit/pages/SettingsPage.js +30 -31
  114. package/dist/botlit/pages/SettingsPage.js.map +1 -1
  115. package/dist/botlit/pages/SkillDetailPage.js +205 -207
  116. package/dist/botlit/pages/SkillDetailPage.js.map +1 -1
  117. package/dist/botlit/pages/SkillsPage.js +68 -69
  118. package/dist/botlit/pages/SkillsPage.js.map +1 -1
  119. package/dist/botlit/pages/StorePackageDetailPage.js +39 -41
  120. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
  121. package/dist/botlit/pages/StorePage.js +169 -171
  122. package/dist/botlit/pages/StorePage.js.map +1 -1
  123. package/dist/botlit/pages/ToolApprovalsPage.js +61 -62
  124. package/dist/botlit/pages/ToolApprovalsPage.js.map +1 -1
  125. package/dist/botlit/providers/WorkspaceFlagScope.d.ts +7 -0
  126. package/dist/botlit/providers/WorkspaceFlagScope.js +17 -0
  127. package/dist/botlit/providers/WorkspaceFlagScope.js.map +1 -0
  128. package/dist/botlit/providers/workspaceFlagKeys.d.ts +18 -0
  129. package/dist/botlit/providers/workspaceFlagKeys.js +8 -0
  130. package/dist/botlit/providers/workspaceFlagKeys.js.map +1 -0
  131. package/dist/index.js +0 -1
  132. package/package.json +4 -1
  133. package/dist/botlit/hooks/index.js +0 -21
  134. package/dist/botlit/index.js +0 -12
  135. package/dist/botlit/permissions/index.js +0 -4
@@ -2,46 +2,44 @@ import { useBotlit as e } from "../providers/BotlitProvider.js";
2
2
  import { isNative as t, nativeCopyText as n, nativeNotify as r, nativeToast as i } from "../../utils/nativeBridge.js";
3
3
  import { useTr as a } from "../../shared/hooks/useTr.js";
4
4
  import { PageLayout as o } from "../components/PageLayout.js";
5
- import { BOTMANOR_PERMISSIONS as s } from "../permissions/botmanorPermissions.js";
6
- import { BotmanorPermissionGate as c } from "../permissions/useBotmanorPermissions.js";
7
5
  import { EmptyState as ee } from "../components/EmptyState.js";
8
6
  import { ErrorState as te } from "../components/ErrorState.js";
9
- import { Card as l, CardContent as u, CardDescription as d, CardHeader as f, CardTitle as p } from "../components/Card.js";
10
- import { Button as m } from "../components/Button.js";
11
- import { FormField as h, Input as g, Textarea as ne } from "../components/Input.js";
12
- import { Badge as _, StatusBadge as re } from "../components/Badge.js";
13
- import "../hooks/index.js";
7
+ import { Card as s, CardContent as c, CardDescription as l, CardHeader as u, CardTitle as d } from "../components/Card.js";
8
+ import { Button as f } from "../components/Button.js";
9
+ import { FormField as p, Input as m, Textarea as ne } from "../components/Input.js";
10
+ import { Badge as h, StatusBadge as re } from "../components/Badge.js";
14
11
  import { promptTemplateExamples as ie, promptTemplateVariables as ae, useCreatePromptTemplate as oe, useDeletePromptTemplate as se, useDuplicatePromptTemplate as ce, useLoadPromptTemplateUsage as le, usePromptTemplate as ue, useRenderPromptTemplate as de, useUpdatePromptTemplate as fe } from "../hooks/usePromptTemplates.js";
15
12
  import { confirmAction as pe } from "../utils/confirmAction.js";
16
13
  import { useUnsavedChangesGuard as me } from "../utils/leaveGuard.js";
17
14
  import { formatRelativeTime as he } from "../utils/formatters.js";
18
- import { graphqlErrorMessage as v } from "../utils/errors.js";
19
- import { PROMPT_TEMPLATE_DESCRIPTION_MAX_LENGTH as ge, PROMPT_TEMPLATE_ERROR_MESSAGES as _e, PROMPT_TEMPLATE_TEXT_MAX_LENGTH as ve, PROMPT_VARIABLE_VALUE_MAX_LENGTH as ye, fillTemplateText as be, hasPromptTemplateErrors as xe, promptTemplateDeleteMessage as Se, splitTemplateText as y, suggestTemplateSlug as Ce, templatePlaceholders as we, validatePromptTemplateForm as Te, variableMismatches as Ee } from "../utils/promptTemplateForm.js";
20
- import { toUnion as b } from "../utils/unions.js";
21
- import "../permissions/index.js";
15
+ import { graphqlErrorMessage as g } from "../utils/errors.js";
16
+ import { PROMPT_TEMPLATE_DESCRIPTION_MAX_LENGTH as ge, PROMPT_TEMPLATE_ERROR_MESSAGES as _e, PROMPT_TEMPLATE_TEXT_MAX_LENGTH as ve, PROMPT_VARIABLE_VALUE_MAX_LENGTH as ye, fillTemplateText as be, hasPromptTemplateErrors as xe, promptTemplateDeleteMessage as Se, splitTemplateText as _, suggestTemplateSlug as Ce, templatePlaceholders as we, validatePromptTemplateForm as Te, variableMismatches as Ee } from "../utils/promptTemplateForm.js";
17
+ import { toUnion as v } from "../utils/unions.js";
18
+ import { BOTMANOR_PERMISSIONS as y } from "../permissions/botmanorPermissions.js";
19
+ import { BotmanorPermissionGate as b } from "../permissions/useBotmanorPermissions.js";
22
20
  import { useMemo as x, useRef as De, useState as S } from "react";
23
21
  import { PagePurpose as Oe, ThemedSelect as C } from "@burdenoff/fe-libs/ui";
24
22
  import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
25
23
  import { useParams as ke } from "react-router";
26
- import { AlertTriangle as D, ArrowLeft as Ae, Check as je, Code as Me, Copy as Ne, CopyPlus as Pe, Edit3 as Fe, Eye as Ie, FileText as Le, Play as O, Plus as Re, Save as ze, Settings as Be, Trash2 as Ve, Variable as k } from "lucide-react";
27
- import { toast as A } from "sonner";
24
+ import { AlertTriangle as Ae, ArrowLeft as je, Check as Me, Code as Ne, Copy as Pe, CopyPlus as Fe, Edit3 as Ie, Eye as Le, FileText as Re, Play as D, Plus as ze, Save as Be, Settings as Ve, Trash2 as He, Variable as O } from "lucide-react";
25
+ import { toast as k } from "sonner";
28
26
  // src/botlit/pages/PromptTemplateDetailPage.tsx
29
- var He = [
27
+ var Ue = [
30
28
  "string",
31
29
  "number",
32
30
  "boolean",
33
31
  "array",
34
32
  "object"
35
- ], j = [
33
+ ], A = [
36
34
  "PRIVATE",
37
35
  "WORKSPACE",
38
36
  "PUBLIC"
39
- ], M = [
37
+ ], j = [
40
38
  "DRAFT",
41
39
  "ACTIVE",
42
40
  "DEPRECATED",
43
41
  "ARCHIVED"
44
- ], Ue = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary", We = {
42
+ ], M = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary", We = {
45
43
  name: "",
46
44
  slug: "",
47
45
  description: "",
@@ -49,7 +47,7 @@ var He = [
49
47
  visibility: "PRIVATE",
50
48
  templateText: "",
51
49
  variables: []
52
- }, Ge = ({ text: e, emptyText: t }) => e ? /* @__PURE__ */ T(w, { children: y(e).map((e, t) => e.variable ? /* @__PURE__ */ T("span", {
50
+ }, Ge = ({ text: e, emptyText: t }) => e ? /* @__PURE__ */ T(w, { children: _(e).map((e, t) => e.variable ? /* @__PURE__ */ T("span", {
53
51
  className: "rounded bg-action-primary-bg/20 px-1 font-mono text-primary",
54
52
  "data-variable": e.variable,
55
53
  children: e.text
@@ -60,8 +58,8 @@ var He = [
60
58
  function N(e) {
61
59
  return e == null ? "" : typeof e == "string" ? e : JSON.stringify(e);
62
60
  }
63
- var P = ({ isNew: y }) => {
64
- let P = a(), { templateId: Ke } = ke(), { navigateTo: F } = e(), { data: I, loading: qe, error: Je, refetch: Ye } = ue(y ? void 0 : Ke), { create: Xe, loading: Ze } = oe(), { update: Qe, loading: $e } = fe(), { remove: et, loading: tt } = se(), { render: nt, loading: rt } = de(), { duplicate: it, loading: at } = ce(), ot = le(), [L, st] = S("edit"), [ct, lt] = S(!1), [R, ut] = S({}), [dt, ft] = S(null), [pt, mt] = S(null), [z, B] = S(!1), [ht, gt] = S(!1), [V, H] = S(We), [_t, vt] = S(We), yt = De(!1), [U, W] = S(!1), [bt, G] = S(!1), xt = !!(y || z), St = x(() => JSON.stringify(V) !== JSON.stringify(_t), [V, _t]), Ct = xt && !bt && St, K = x(() => Te(V, !!y), [V, y]), q = xe(K), wt = x(() => we(V.templateText), [V.templateText]), J = x(() => Ee(V.templateText, V.variables), [V.templateText, V.variables]);
61
+ var P = ({ isNew: _ }) => {
62
+ let P = a(), { templateId: Ke } = ke(), { navigateTo: F } = e(), { data: I, loading: qe, error: Je, refetch: Ye } = ue(_ ? void 0 : Ke), { create: Xe, loading: Ze } = oe(), { update: Qe, loading: $e } = fe(), { remove: et, loading: tt } = se(), { render: nt, loading: rt } = de(), { duplicate: it, loading: at } = ce(), ot = le(), [L, st] = S("edit"), [ct, lt] = S(!1), [R, ut] = S({}), [dt, ft] = S(null), [pt, mt] = S(null), [z, B] = S(!1), [ht, gt] = S(!1), [V, H] = S(We), [_t, vt] = S(We), yt = De(!1), [U, W] = S(!1), [bt, G] = S(!1), xt = !!(_ || z), St = x(() => JSON.stringify(V) !== JSON.stringify(_t), [V, _t]), Ct = xt && !bt && St, K = x(() => Te(V, !!_), [V, _]), q = xe(K), wt = x(() => we(V.templateText), [V.templateText]), J = x(() => Ee(V.templateText, V.variables), [V.templateText, V.variables]);
65
63
  me(Ct, P);
66
64
  let Y = (e) => U && e ? P(`botlit.promptTemplates.errors.${e}`, _e[e]) : void 0, Tt = (e) => U && e ? P(`botlit.promptTemplates.errors.${e}`, _e[e]) : void 0, Et = async () => !Ct || pe({
67
65
  title: P("botlit.promptTemplates.discard.title", "Discard changes?"),
@@ -93,14 +91,14 @@ var P = ({ isNew: y }) => {
93
91
  exampleInputs: []
94
92
  });
95
93
  } catch (e) {
96
- A.error(v(e, P("botlit.promptTemplates.createError", "Failed to create the prompt template")));
94
+ k.error(g(e, P("botlit.promptTemplates.createError", "Failed to create the prompt template")));
97
95
  return;
98
96
  }
99
- G(!0), A.success(P("botlit.promptTemplates.created", "Template \"{{name}}\" created", { name: t })), F(n?.id ? `prompt-templates/${n.id}` : "prompt-templates");
97
+ G(!0), k.success(P("botlit.promptTemplates.created", "Template \"{{name}}\" created", { name: t })), F(n?.id ? `prompt-templates/${n.id}` : "prompt-templates");
100
98
  }, At = (e) => H((t) => ({
101
99
  ...t,
102
100
  name: e,
103
- slug: y && !yt.current ? Ce(e) : t.slug
101
+ slug: _ && !yt.current ? Ce(e) : t.slug
104
102
  })), jt = (e = "") => {
105
103
  H((t) => ({
106
104
  ...t,
@@ -145,8 +143,8 @@ var P = ({ isNew: y }) => {
145
143
  });
146
144
  ft(e ?? null);
147
145
  } catch (e) {
148
- let t = v(e, P("botlit.promptTemplates.renderError", "Failed to render the prompt template"));
149
- ft(null), mt(t), A.error(t);
146
+ let t = g(e, P("botlit.promptTemplates.renderError", "Failed to render the prompt template"));
147
+ ft(null), mt(t), k.error(t);
150
148
  }
151
149
  }
152
150
  }, Ft = async () => {
@@ -158,8 +156,8 @@ var P = ({ isNew: y }) => {
158
156
  name: I.name,
159
157
  slug: I.slug,
160
158
  description: I.description || "",
161
- status: b(I.status, M, "DRAFT"),
162
- visibility: b(I.visibility, j, "PRIVATE"),
159
+ status: v(I.status, j, "DRAFT"),
160
+ visibility: v(I.visibility, A, "PRIVATE"),
163
161
  templateText: I.templateText,
164
162
  variables: ae(I)
165
163
  };
@@ -179,10 +177,10 @@ var P = ({ isNew: y }) => {
179
177
  }
180
178
  });
181
179
  } catch (e) {
182
- A.error(v(e, P("botlit.promptTemplates.updateError", "Failed to update the prompt template")));
180
+ k.error(g(e, P("botlit.promptTemplates.updateError", "Failed to update the prompt template")));
183
181
  return;
184
182
  }
185
- A.success(P("botlit.promptTemplates.updated", "Template updated")), B(!1), W(!1), Ye();
183
+ k.success(P("botlit.promptTemplates.updated", "Template updated")), B(!1), W(!1), Ye();
186
184
  }
187
185
  }, Rt = async () => {
188
186
  if (!I) return;
@@ -193,10 +191,10 @@ var P = ({ isNew: y }) => {
193
191
  name: n
194
192
  });
195
193
  } catch (e) {
196
- A.error(v(e, P("botlit.promptTemplates.duplicate.error", "Failed to duplicate the prompt template")));
194
+ k.error(g(e, P("botlit.promptTemplates.duplicate.error", "Failed to duplicate the prompt template")));
197
195
  return;
198
196
  }
199
- A.success(P("botlit.promptTemplates.duplicate.done", "Created \"{{name}}\" as a draft copy. Rename it and adjust it as needed.", { name: n })), r?.id && F(`prompt-templates/${r.id}`);
197
+ k.success(P("botlit.promptTemplates.duplicate.done", "Created \"{{name}}\" as a draft copy. Rename it and adjust it as needed.", { name: n })), r?.id && F(`prompt-templates/${r.id}`);
200
198
  }, zt = async () => {
201
199
  if (!I) return;
202
200
  gt(!0);
@@ -216,19 +214,19 @@ var P = ({ isNew: y }) => {
216
214
  })) {
217
215
  try {
218
216
  if (await et(I.id) === !1) {
219
- A.error(P("botlit.promptTemplates.delete.notDeleted", "The prompt template could not be deleted."));
217
+ k.error(P("botlit.promptTemplates.delete.notDeleted", "The prompt template could not be deleted."));
220
218
  return;
221
219
  }
222
220
  } catch (e) {
223
- t() && r("error"), A.error(v(e, P("botlit.promptTemplates.delete.error", "Failed to delete the prompt template")));
221
+ t() && r("error"), k.error(g(e, P("botlit.promptTemplates.delete.error", "Failed to delete the prompt template")));
224
222
  return;
225
223
  }
226
- t() && r("success"), A.success(P("botlit.promptTemplates.delete.done", "Template \"{{name}}\" deleted", { name: I.name })), F("prompt-templates");
224
+ t() && r("success"), k.success(P("botlit.promptTemplates.delete.done", "Template \"{{name}}\" deleted", { name: I.name })), F("prompt-templates");
227
225
  }
228
226
  }, Bt = U && q ? /* @__PURE__ */ E("div", {
229
227
  role: "alert",
230
228
  className: "flex items-start gap-2 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-text-primary",
231
- children: [/* @__PURE__ */ T(D, {
229
+ children: [/* @__PURE__ */ T(Ae, {
232
230
  size: 16,
233
231
  className: "mt-0.5 text-status-error-text",
234
232
  "aria-hidden": "true"
@@ -236,13 +234,13 @@ var P = ({ isNew: y }) => {
236
234
  }) : null, Vt = /* @__PURE__ */ E(w, { children: [
237
235
  /* @__PURE__ */ E("div", {
238
236
  className: "grid grid-cols-1 gap-4 md:grid-cols-2",
239
- children: [/* @__PURE__ */ T(h, {
237
+ children: [/* @__PURE__ */ T(p, {
240
238
  label: P("botlit.promptTemplates.form.name", "Template name"),
241
239
  htmlFor: "tpl-name",
242
240
  required: !0,
243
241
  error: Y(K.name),
244
242
  description: P("botlit.promptTemplates.form.nameHelp", "Up to {{max}} characters.", { max: 100 }),
245
- children: /* @__PURE__ */ T(g, {
243
+ children: /* @__PURE__ */ T(m, {
246
244
  id: "tpl-name",
247
245
  maxLength: 100,
248
246
  "aria-invalid": !!Y(K.name),
@@ -251,13 +249,13 @@ var P = ({ isNew: y }) => {
251
249
  value: V.name,
252
250
  onChange: (e) => At(e.target.value)
253
251
  })
254
- }), y ? /* @__PURE__ */ T(h, {
252
+ }), _ ? /* @__PURE__ */ T(p, {
255
253
  label: P("botlit.promptTemplates.form.slug", "Slug"),
256
254
  htmlFor: "tpl-slug",
257
255
  required: !0,
258
256
  error: Y(K.slug),
259
257
  description: P("botlit.promptTemplates.form.slugHelp", "Suggested from the name. Lowercase letters, numbers and single hyphens, up to {{max}} characters. It cannot change after the template is created.", { max: 64 }),
260
- children: /* @__PURE__ */ T(g, {
258
+ children: /* @__PURE__ */ T(m, {
261
259
  id: "tpl-slug",
262
260
  className: "font-mono",
263
261
  maxLength: 64,
@@ -272,11 +270,11 @@ var P = ({ isNew: y }) => {
272
270
  });
273
271
  }
274
272
  })
275
- }) : /* @__PURE__ */ T(h, {
273
+ }) : /* @__PURE__ */ T(p, {
276
274
  label: P("botlit.promptTemplates.form.slug", "Slug"),
277
275
  htmlFor: "tpl-slug",
278
276
  description: P("botlit.promptTemplates.form.slugLocked", "The slug cannot change: lookups by slug depend on it."),
279
- children: /* @__PURE__ */ T(g, {
277
+ children: /* @__PURE__ */ T(m, {
280
278
  id: "tpl-slug",
281
279
  className: "font-mono",
282
280
  readOnly: !0,
@@ -285,7 +283,7 @@ var P = ({ isNew: y }) => {
285
283
  })
286
284
  })]
287
285
  }),
288
- /* @__PURE__ */ T(h, {
286
+ /* @__PURE__ */ T(p, {
289
287
  label: P("botlit.promptTemplates.form.description", "Description"),
290
288
  htmlFor: "tpl-description",
291
289
  error: Y(K.description),
@@ -303,45 +301,45 @@ var P = ({ isNew: y }) => {
303
301
  }),
304
302
  /* @__PURE__ */ E("div", {
305
303
  className: "grid grid-cols-1 gap-4 md:grid-cols-2",
306
- children: [/* @__PURE__ */ T(h, {
304
+ children: [/* @__PURE__ */ T(p, {
307
305
  label: P("botlit.promptTemplates.form.status", "Status"),
308
306
  htmlFor: "tpl-status",
309
307
  description: P("botlit.promptTemplates.form.statusHelp", "Archived templates are ignored by agents and skills, as if detached. Draft, active and deprecated templates are all used."),
310
308
  children: /* @__PURE__ */ T(C, {
311
309
  id: "tpl-status",
312
- className: Ue,
310
+ className: M,
313
311
  "aria-describedby": "tpl-status-description",
314
312
  value: V.status,
315
313
  onChange: (e) => H({
316
314
  ...V,
317
- status: b(e.target.value, M, "DRAFT")
315
+ status: v(e.target.value, j, "DRAFT")
318
316
  }),
319
- children: M.map((e) => /* @__PURE__ */ T("option", {
317
+ children: j.map((e) => /* @__PURE__ */ T("option", {
320
318
  value: e,
321
319
  children: P(`botlit.promptTemplates.status.${e.toLowerCase()}`, e.charAt(0) + e.slice(1).toLowerCase())
322
320
  }, e))
323
321
  })
324
- }), /* @__PURE__ */ T(h, {
322
+ }), /* @__PURE__ */ T(p, {
325
323
  label: P("botlit.promptTemplates.form.visibility", "Visibility"),
326
324
  htmlFor: "tpl-visibility",
327
325
  description: P("botlit.promptTemplates.form.visibilityHelp", "Not enforced yet: every member who can view templates sees this one."),
328
326
  children: /* @__PURE__ */ T(C, {
329
327
  id: "tpl-visibility",
330
- className: Ue,
328
+ className: M,
331
329
  "aria-describedby": "tpl-visibility-description",
332
330
  value: V.visibility,
333
331
  onChange: (e) => H({
334
332
  ...V,
335
- visibility: b(e.target.value, j, "PRIVATE")
333
+ visibility: v(e.target.value, A, "PRIVATE")
336
334
  }),
337
- children: j.map((e) => /* @__PURE__ */ T("option", {
335
+ children: A.map((e) => /* @__PURE__ */ T("option", {
338
336
  value: e,
339
337
  children: P(`botlit.promptTemplates.visibility.${e.toLowerCase()}`, e.charAt(0) + e.slice(1).toLowerCase())
340
338
  }, e))
341
339
  })
342
340
  })]
343
341
  })
344
- ] }), Ht = /* @__PURE__ */ T(h, {
342
+ ] }), Ht = /* @__PURE__ */ T(p, {
345
343
  label: P("botlit.promptTemplates.form.content", "Template text"),
346
344
  htmlFor: "tpl-content",
347
345
  required: !0,
@@ -373,13 +371,13 @@ var P = ({ isNew: y }) => {
373
371
  children: [J.undeclared.length > 0 && /* @__PURE__ */ E("div", {
374
372
  className: "flex flex-wrap items-center gap-2",
375
373
  children: [
376
- /* @__PURE__ */ T(D, {
374
+ /* @__PURE__ */ T(Ae, {
377
375
  size: 16,
378
376
  className: "text-status-warning-text",
379
377
  "aria-hidden": "true"
380
378
  }),
381
379
  /* @__PURE__ */ T("span", { children: P("botlit.promptTemplates.variables.undeclared", "Used in the text but not declared: {{names}}. Rendering fails until they are declared.", { names: J.undeclared.join(", ") }) }),
382
- /* @__PURE__ */ T(m, {
380
+ /* @__PURE__ */ T(f, {
383
381
  type: "button",
384
382
  size: "sm",
385
383
  variant: "outline",
@@ -389,29 +387,29 @@ var P = ({ isNew: y }) => {
389
387
  ]
390
388
  }), J.unused.length > 0 && /* @__PURE__ */ E("div", {
391
389
  className: "flex items-center gap-2",
392
- children: [/* @__PURE__ */ T(D, {
390
+ children: [/* @__PURE__ */ T(Ae, {
393
391
  size: 16,
394
392
  className: "text-status-warning-text",
395
393
  "aria-hidden": "true"
396
394
  }), /* @__PURE__ */ T("span", { children: P("botlit.promptTemplates.variables.unused", "Declared but not used in the text: {{names}}.", { names: J.unused.join(", ") }) })]
397
395
  })]
398
- }) : null, Wt = /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ E(f, { children: [/* @__PURE__ */ E(p, {
396
+ }) : null, Wt = /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E(u, { children: [/* @__PURE__ */ E(d, {
399
397
  className: "flex items-center justify-between",
400
398
  children: [/* @__PURE__ */ E("span", {
401
399
  className: "flex items-center gap-2",
402
- children: [/* @__PURE__ */ T(k, {
400
+ children: [/* @__PURE__ */ T(O, {
403
401
  size: 18,
404
402
  "aria-hidden": "true"
405
403
  }), P("botlit.promptTemplates.variables.title", "Variables")]
406
- }), /* @__PURE__ */ T(m, {
404
+ }), /* @__PURE__ */ T(f, {
407
405
  type: "button",
408
406
  variant: "outline",
409
407
  size: "sm",
410
- leftIcon: /* @__PURE__ */ T(Re, { size: 14 }),
408
+ leftIcon: /* @__PURE__ */ T(ze, { size: 14 }),
411
409
  onClick: () => jt(),
412
410
  children: P("botlit.promptTemplates.variables.add", "Add variable")
413
411
  })]
414
- }), /* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.variables.description", "Declare each variable the text uses. A required variable must be given a value (or have a default) whenever the template is used; an optional one without a value is left out. Types are checked when the template is used.") })] }), /* @__PURE__ */ E(u, {
412
+ }), /* @__PURE__ */ T(l, { children: P("botlit.promptTemplates.variables.description", "Declare each variable the text uses. A required variable must be given a value (or have a default) whenever the template is used; an optional one without a value is left out. Types are checked when the template is used.") })] }), /* @__PURE__ */ E(c, {
415
413
  className: "space-y-4",
416
414
  children: [Ut, V.variables.length > 0 ? /* @__PURE__ */ T("ul", {
417
415
  className: "space-y-4",
@@ -423,12 +421,12 @@ var P = ({ isNew: y }) => {
423
421
  /* @__PURE__ */ E("div", {
424
422
  className: "grid grid-cols-1 gap-3 md:grid-cols-3",
425
423
  children: [
426
- /* @__PURE__ */ T(h, {
424
+ /* @__PURE__ */ T(p, {
427
425
  label: P("botlit.promptTemplates.variables.name", "Name"),
428
426
  htmlFor: `${n}-name`,
429
427
  required: !0,
430
428
  error: i,
431
- children: /* @__PURE__ */ T(g, {
429
+ children: /* @__PURE__ */ T(m, {
432
430
  id: `${n}-name`,
433
431
  className: "font-mono",
434
432
  "aria-invalid": !!i,
@@ -438,26 +436,26 @@ var P = ({ isNew: y }) => {
438
436
  onChange: (e) => Z(t, { name: e.target.value })
439
437
  })
440
438
  }),
441
- /* @__PURE__ */ T(h, {
439
+ /* @__PURE__ */ T(p, {
442
440
  label: P("botlit.promptTemplates.variables.type", "Type"),
443
441
  htmlFor: `${n}-type`,
444
442
  children: /* @__PURE__ */ T(C, {
445
443
  id: `${n}-type`,
446
- className: Ue,
444
+ className: M,
447
445
  value: e.type,
448
- onChange: (e) => Z(t, { type: b(e.target.value, He, "string") }),
449
- children: He.map((e) => /* @__PURE__ */ T("option", {
446
+ onChange: (e) => Z(t, { type: v(e.target.value, Ue, "string") }),
447
+ children: Ue.map((e) => /* @__PURE__ */ T("option", {
450
448
  value: e,
451
449
  children: e
452
450
  }, e))
453
451
  })
454
452
  }),
455
- /* @__PURE__ */ T(h, {
453
+ /* @__PURE__ */ T(p, {
456
454
  label: P("botlit.promptTemplates.variables.default", "Default value"),
457
455
  htmlFor: `${n}-default`,
458
456
  error: a,
459
457
  description: o ? P("botlit.promptTemplates.variables.defaultJsonHelp", "Optional. JSON, for example [\"a\", \"b\"] or {\"key\": \"value\"}.") : P("botlit.promptTemplates.variables.defaultHelp", "Optional. Used when no value is given."),
460
- children: /* @__PURE__ */ T(g, {
458
+ children: /* @__PURE__ */ T(m, {
461
459
  id: `${n}-default`,
462
460
  className: o ? "font-mono" : void 0,
463
461
  maxLength: ye,
@@ -469,10 +467,10 @@ var P = ({ isNew: y }) => {
469
467
  })
470
468
  ]
471
469
  }),
472
- /* @__PURE__ */ T(h, {
470
+ /* @__PURE__ */ T(p, {
473
471
  label: P("botlit.promptTemplates.variables.descriptionLabel", "Description"),
474
472
  htmlFor: `${n}-description`,
475
- children: /* @__PURE__ */ T(g, {
473
+ children: /* @__PURE__ */ T(m, {
476
474
  id: `${n}-description`,
477
475
  placeholder: P("botlit.promptTemplates.variables.descriptionPlaceholder", "What is this variable for?"),
478
476
  value: e.description || "",
@@ -491,7 +489,7 @@ var P = ({ isNew: y }) => {
491
489
  onChange: (e) => Z(t, { required: e.target.checked }),
492
490
  className: "h-4 w-4"
493
491
  }), P("botlit.promptTemplates.variables.required", "Required: a value or default must be given")]
494
- }), /* @__PURE__ */ T(m, {
492
+ }), /* @__PURE__ */ T(f, {
495
493
  type: "button",
496
494
  variant: "ghost",
497
495
  size: "sm",
@@ -507,7 +505,7 @@ var P = ({ isNew: y }) => {
507
505
  }) : /* @__PURE__ */ E("div", {
508
506
  className: "py-6 text-center text-text-secondary",
509
507
  children: [
510
- /* @__PURE__ */ T(k, {
508
+ /* @__PURE__ */ T(O, {
511
509
  className: "mx-auto mb-2 h-8 w-8 opacity-50",
512
510
  "aria-hidden": "true"
513
511
  }),
@@ -518,42 +516,42 @@ var P = ({ isNew: y }) => {
518
516
  })
519
517
  ]
520
518
  })]
521
- })] }), Gt = /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ E(f, { children: [/* @__PURE__ */ E(p, {
519
+ })] }), Gt = /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E(u, { children: [/* @__PURE__ */ E(d, {
522
520
  className: "flex items-center gap-2",
523
- children: [/* @__PURE__ */ T(Ie, {
521
+ children: [/* @__PURE__ */ T(Le, {
524
522
  size: 18,
525
523
  "aria-hidden": "true"
526
524
  }), P("botlit.promptTemplates.highlighted.title", "Template with variables highlighted")]
527
- }), /* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.highlighted.description", "The text as written; values are filled in when an agent, a skill or Prompt Studio uses it.") })] }), /* @__PURE__ */ T(u, { children: /* @__PURE__ */ T("div", {
525
+ }), /* @__PURE__ */ T(l, { children: P("botlit.promptTemplates.highlighted.description", "The text as written; values are filled in when an agent, a skill or Prompt Studio uses it.") })] }), /* @__PURE__ */ T(c, { children: /* @__PURE__ */ T("div", {
528
526
  className: "whitespace-pre-wrap break-words rounded-lg bg-bg-sunken p-4 font-mono text-sm",
529
527
  children: /* @__PURE__ */ T(Ge, {
530
528
  text: V.templateText,
531
529
  emptyText: P("botlit.promptTemplates.highlighted.empty", "Enter template text...")
532
530
  })
533
531
  }) })] });
534
- if (y) return /* @__PURE__ */ T(o, {
532
+ if (_) return /* @__PURE__ */ T(o, {
535
533
  title: P("botlit.promptTemplates.createTitle", "Create Prompt Template"),
536
534
  description: P("botlit.promptTemplates.createDescription", "Define a reusable prompt with variables"),
537
- leading: /* @__PURE__ */ T(m, {
535
+ leading: /* @__PURE__ */ T(f, {
538
536
  variant: "ghost",
539
537
  size: "icon",
540
538
  "aria-label": P("botlit.promptTemplates.back", "Back to prompt templates"),
541
539
  onClick: () => void X("prompt-templates"),
542
- children: /* @__PURE__ */ T(Ae, {
540
+ children: /* @__PURE__ */ T(je, {
543
541
  size: 20,
544
542
  "aria-hidden": "true"
545
543
  })
546
544
  }),
547
545
  actions: /* @__PURE__ */ E("div", {
548
546
  className: "flex gap-2",
549
- children: [/* @__PURE__ */ T(m, {
547
+ children: [/* @__PURE__ */ T(f, {
550
548
  variant: "outline",
551
549
  onClick: () => void X("prompt-templates"),
552
550
  children: P("botlit.common.cancel", "Cancel")
553
- }), /* @__PURE__ */ T(m, {
551
+ }), /* @__PURE__ */ T(f, {
554
552
  type: "submit",
555
553
  form: "tpl-create-form",
556
- leftIcon: /* @__PURE__ */ T(ze, { size: 16 }),
554
+ leftIcon: /* @__PURE__ */ T(Be, { size: 16 }),
557
555
  isLoading: Ze,
558
556
  children: P("botlit.promptTemplates.createSubmit", "Create Template")
559
557
  })]
@@ -567,22 +565,22 @@ var P = ({ isNew: y }) => {
567
565
  className: "space-y-6 lg:col-span-2",
568
566
  children: [
569
567
  Bt,
570
- /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ T(f, { children: /* @__PURE__ */ T(p, { children: P("botlit.promptTemplates.form.basics", "Basic information") }) }), /* @__PURE__ */ T(u, {
568
+ /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ T(u, { children: /* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.form.basics", "Basic information") }) }), /* @__PURE__ */ T(c, {
571
569
  className: "space-y-4",
572
570
  children: Vt
573
571
  })] }),
574
- /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ T(f, { children: /* @__PURE__ */ E(p, {
572
+ /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ T(u, { children: /* @__PURE__ */ E(d, {
575
573
  className: "flex items-center gap-2",
576
- children: [/* @__PURE__ */ T(Me, {
574
+ children: [/* @__PURE__ */ T(Ne, {
577
575
  size: 18,
578
576
  "aria-hidden": "true"
579
577
  }), P("botlit.promptTemplates.form.contentTitle", "Template content")]
580
- }) }), /* @__PURE__ */ T(u, { children: Ht })] }),
578
+ }) }), /* @__PURE__ */ T(c, { children: Ht })] }),
581
579
  Wt
582
580
  ]
583
581
  }), /* @__PURE__ */ E("div", {
584
582
  className: "space-y-6",
585
- children: [Gt, /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ T(f, { children: /* @__PURE__ */ T(p, { children: P("botlit.promptTemplates.tips.title", "How templates are used") }) }), /* @__PURE__ */ T(u, {
583
+ children: [Gt, /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ T(u, { children: /* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.tips.title", "How templates are used") }) }), /* @__PURE__ */ T(c, {
586
584
  className: "space-y-2 text-sm text-text-secondary",
587
585
  children: /* @__PURE__ */ E("ul", {
588
586
  className: "list-inside list-disc space-y-1",
@@ -621,7 +619,7 @@ var P = ({ isNew: y }) => {
621
619
  illustration: "empty-files",
622
620
  title: P("botlit.promptTemplates.notFound.title", "Template not found"),
623
621
  description: P("botlit.promptTemplates.notFound.description", "This prompt template does not exist or was deleted."),
624
- action: /* @__PURE__ */ T(m, {
622
+ action: /* @__PURE__ */ T(f, {
625
623
  onClick: () => F("prompt-templates"),
626
624
  children: P("botlit.promptTemplates.back", "Back to prompt templates")
627
625
  })
@@ -630,17 +628,17 @@ var P = ({ isNew: y }) => {
630
628
  let Q = ae(I), $ = ie(I);
631
629
  return /* @__PURE__ */ T(o, {
632
630
  title: I.name,
633
- leading: /* @__PURE__ */ T(m, {
631
+ leading: /* @__PURE__ */ T(f, {
634
632
  variant: "ghost",
635
633
  size: "icon",
636
634
  "aria-label": P("botlit.promptTemplates.back", "Back to prompt templates"),
637
635
  onClick: () => void X("prompt-templates"),
638
- children: /* @__PURE__ */ T(Ae, {
636
+ children: /* @__PURE__ */ T(je, {
639
637
  size: 20,
640
638
  "aria-hidden": "true"
641
639
  })
642
640
  }),
643
- meta: /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(re, { status: I.status }), /* @__PURE__ */ E(_, {
641
+ meta: /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(re, { status: I.status }), /* @__PURE__ */ E(h, {
644
642
  variant: "secondary",
645
643
  className: "font-mono",
646
644
  children: ["v", I.version]
@@ -651,47 +649,47 @@ var P = ({ isNew: y }) => {
651
649
  }),
652
650
  actions: /* @__PURE__ */ T("div", {
653
651
  className: "flex flex-wrap gap-2",
654
- children: z ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(m, {
652
+ children: z ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(f, {
655
653
  variant: "outline",
656
654
  onClick: () => void Dt(),
657
655
  children: P("botlit.common.cancel", "Cancel")
658
- }), /* @__PURE__ */ T(m, {
656
+ }), /* @__PURE__ */ T(f, {
659
657
  type: "submit",
660
658
  form: "tpl-edit-form",
661
- leftIcon: /* @__PURE__ */ T(ze, { size: 16 }),
659
+ leftIcon: /* @__PURE__ */ T(Be, { size: 16 }),
662
660
  isLoading: $e,
663
661
  children: P("botlit.promptTemplates.save", "Save changes")
664
662
  })] }) : /* @__PURE__ */ E(w, { children: [
665
- /* @__PURE__ */ T(m, {
663
+ /* @__PURE__ */ T(f, {
666
664
  variant: "outline",
667
- leftIcon: T(ct ? je : Ne, { size: 16 }),
665
+ leftIcon: T(ct ? Me : Pe, { size: 16 }),
668
666
  onClick: () => void Ft(),
669
667
  children: ct ? P("botlit.promptTemplates.copiedButton", "Copied!") : P("botlit.promptTemplates.copy", "Copy text")
670
668
  }),
671
- /* @__PURE__ */ T(c, {
672
- permission: s.PROMPT_TEMPLATE_CREATE,
673
- children: /* @__PURE__ */ T(m, {
669
+ /* @__PURE__ */ T(b, {
670
+ permission: y.PROMPT_TEMPLATE_CREATE,
671
+ children: /* @__PURE__ */ T(f, {
674
672
  variant: "outline",
675
- leftIcon: /* @__PURE__ */ T(Pe, { size: 16 }),
673
+ leftIcon: /* @__PURE__ */ T(Fe, { size: 16 }),
676
674
  onClick: () => void Rt(),
677
675
  isLoading: at,
678
676
  children: P("botlit.promptTemplates.duplicate.action", "Duplicate")
679
677
  })
680
678
  }),
681
- /* @__PURE__ */ T(c, {
682
- permission: s.PROMPT_TEMPLATE_UPDATE,
683
- children: /* @__PURE__ */ T(m, {
679
+ /* @__PURE__ */ T(b, {
680
+ permission: y.PROMPT_TEMPLATE_UPDATE,
681
+ children: /* @__PURE__ */ T(f, {
684
682
  variant: "outline",
685
- leftIcon: /* @__PURE__ */ T(Fe, { size: 16 }),
683
+ leftIcon: /* @__PURE__ */ T(Ie, { size: 16 }),
686
684
  onClick: It,
687
685
  children: P("botlit.promptTemplates.edit", "Edit Template")
688
686
  })
689
687
  }),
690
- /* @__PURE__ */ T(c, {
691
- permission: s.PROMPT_TEMPLATE_DELETE,
692
- children: /* @__PURE__ */ T(m, {
688
+ /* @__PURE__ */ T(b, {
689
+ permission: y.PROMPT_TEMPLATE_DELETE,
690
+ children: /* @__PURE__ */ T(f, {
693
691
  variant: "outline",
694
- leftIcon: /* @__PURE__ */ T(Ve, { size: 16 }),
692
+ leftIcon: /* @__PURE__ */ T(He, { size: 16 }),
695
693
  onClick: () => void zt(),
696
694
  isLoading: tt || ht,
697
695
  children: P("botlit.promptTemplates.delete.action", "Delete")
@@ -703,7 +701,7 @@ var P = ({ isNew: y }) => {
703
701
  className: "space-y-6",
704
702
  children: [
705
703
  /* @__PURE__ */ T(Oe, {
706
- icon: /* @__PURE__ */ T(Le, { size: 18 }),
704
+ icon: /* @__PURE__ */ T(Re, { size: 18 }),
707
705
  children: P("botlit.promptTemplates.detailPurpose", "This is one reusable prompt template: its text with {{variables}}, its declared variables and example inputs. Agents bound to it and skills that carry it use the current text at their next run. To try a draft against a model or keep version history, open it in Prompt Studio.", { variables: "{{variables}}" })
708
706
  }),
709
707
  z && /* @__PURE__ */ E("form", {
@@ -713,7 +711,7 @@ var P = ({ isNew: y }) => {
713
711
  className: "space-y-6",
714
712
  children: [
715
713
  Bt,
716
- /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ E(f, { children: [/* @__PURE__ */ T(p, { children: P("botlit.promptTemplates.editTitle", "Edit template") }), /* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.editDescription", "Saving updates the template in place for every agent and skill that uses it. Prompt Studio saves a new version instead and keeps the old one.") })] }), /* @__PURE__ */ E(u, {
714
+ /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E(u, { children: [/* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.editTitle", "Edit template") }), /* @__PURE__ */ T(l, { children: P("botlit.promptTemplates.editDescription", "Saving updates the template in place for every agent and skill that uses it. Prompt Studio saves a new version instead and keeps the old one.") })] }), /* @__PURE__ */ E(c, {
717
715
  className: "space-y-4",
718
716
  children: [Vt, Ht]
719
717
  })] }),
@@ -724,7 +722,7 @@ var P = ({ isNew: y }) => {
724
722
  /* @__PURE__ */ E("div", {
725
723
  className: "grid grid-cols-2 gap-4 md:grid-cols-4",
726
724
  children: [
727
- /* @__PURE__ */ T(l, { children: /* @__PURE__ */ E(u, {
725
+ /* @__PURE__ */ T(s, { children: /* @__PURE__ */ E(c, {
728
726
  className: "pt-6 text-center",
729
727
  children: [/* @__PURE__ */ T("p", {
730
728
  className: "text-3xl font-bold text-text-primary",
@@ -734,7 +732,7 @@ var P = ({ isNew: y }) => {
734
732
  children: P("botlit.promptTemplates.stats.variables", "Variables")
735
733
  })]
736
734
  }) }),
737
- /* @__PURE__ */ T(l, { children: /* @__PURE__ */ E(u, {
735
+ /* @__PURE__ */ T(s, { children: /* @__PURE__ */ E(c, {
738
736
  className: "pt-6 text-center",
739
737
  children: [/* @__PURE__ */ E("p", {
740
738
  className: "text-3xl font-bold text-text-primary",
@@ -744,7 +742,7 @@ var P = ({ isNew: y }) => {
744
742
  children: P("botlit.promptTemplates.stats.version", "Version (saved in Prompt Studio)")
745
743
  })]
746
744
  }) }),
747
- /* @__PURE__ */ T(l, { children: /* @__PURE__ */ E(u, {
745
+ /* @__PURE__ */ T(s, { children: /* @__PURE__ */ E(c, {
748
746
  className: "pt-6 text-center",
749
747
  children: [/* @__PURE__ */ T("p", {
750
748
  className: "text-3xl font-bold text-text-primary",
@@ -754,7 +752,7 @@ var P = ({ isNew: y }) => {
754
752
  children: P("botlit.promptTemplates.stats.revision", "Revision (every save)")
755
753
  })]
756
754
  }) }),
757
- /* @__PURE__ */ T(l, { children: /* @__PURE__ */ E(u, {
755
+ /* @__PURE__ */ T(s, { children: /* @__PURE__ */ E(c, {
758
756
  className: "pt-6 text-center",
759
757
  children: [/* @__PURE__ */ T("p", {
760
758
  className: "text-lg font-bold text-text-primary",
@@ -773,7 +771,7 @@ var P = ({ isNew: y }) => {
773
771
  children: [
774
772
  [
775
773
  "edit",
776
- /* @__PURE__ */ T(Me, {
774
+ /* @__PURE__ */ T(Ne, {
777
775
  className: "mr-2 h-4 w-4",
778
776
  "aria-hidden": "true"
779
777
  }, "i"),
@@ -781,7 +779,7 @@ var P = ({ isNew: y }) => {
781
779
  ],
782
780
  [
783
781
  "preview",
784
- /* @__PURE__ */ T(Ie, {
782
+ /* @__PURE__ */ T(Le, {
785
783
  className: "mr-2 h-4 w-4",
786
784
  "aria-hidden": "true"
787
785
  }, "i"),
@@ -789,13 +787,13 @@ var P = ({ isNew: y }) => {
789
787
  ],
790
788
  [
791
789
  "test",
792
- /* @__PURE__ */ T(O, {
790
+ /* @__PURE__ */ T(D, {
793
791
  className: "mr-2 h-4 w-4",
794
792
  "aria-hidden": "true"
795
793
  }, "i"),
796
794
  P("botlit.promptTemplates.tabs.test", "Test render")
797
795
  ]
798
- ].map(([e, t, n]) => /* @__PURE__ */ E(m, {
796
+ ].map(([e, t, n]) => /* @__PURE__ */ E(f, {
799
797
  id: `prompt-template-tab-${e}`,
800
798
  role: "tab",
801
799
  "aria-selected": L === e,
@@ -812,17 +810,17 @@ var P = ({ isNew: y }) => {
812
810
  "aria-labelledby": "prompt-template-tab-edit",
813
811
  children: [/* @__PURE__ */ T("div", {
814
812
  className: "lg:col-span-2",
815
- children: /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ T(f, { children: /* @__PURE__ */ T(p, { children: P("botlit.promptTemplates.form.contentTitle", "Template content") }) }), /* @__PURE__ */ T(u, { children: /* @__PURE__ */ T("div", {
813
+ children: /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ T(u, { children: /* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.form.contentTitle", "Template content") }) }), /* @__PURE__ */ T(c, { children: /* @__PURE__ */ T("div", {
816
814
  className: "whitespace-pre-wrap break-words rounded-lg bg-bg-sunken p-4 font-mono text-sm",
817
815
  children: /* @__PURE__ */ T(Ge, { text: I.templateText })
818
816
  }) })] })
819
- }), /* @__PURE__ */ T("div", { children: /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ T(f, { children: /* @__PURE__ */ E(p, {
817
+ }), /* @__PURE__ */ T("div", { children: /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ T(u, { children: /* @__PURE__ */ E(d, {
820
818
  className: "flex items-center gap-2",
821
- children: [/* @__PURE__ */ T(k, {
819
+ children: [/* @__PURE__ */ T(O, {
822
820
  size: 18,
823
821
  "aria-hidden": "true"
824
822
  }), P("botlit.promptTemplates.variables.titleCount", "Variables ({{count}})", { count: Q.length })]
825
- }) }), /* @__PURE__ */ T(u, { children: Q.length > 0 ? /* @__PURE__ */ T("ul", {
823
+ }) }), /* @__PURE__ */ T(c, { children: Q.length > 0 ? /* @__PURE__ */ T("ul", {
826
824
  className: "space-y-3",
827
825
  children: Q.map((e) => /* @__PURE__ */ E("li", {
828
826
  className: "rounded-lg border p-3",
@@ -834,11 +832,11 @@ var P = ({ isNew: y }) => {
834
832
  children: e.name
835
833
  }), /* @__PURE__ */ E("div", {
836
834
  className: "flex gap-1",
837
- children: [/* @__PURE__ */ T(_, {
835
+ children: [/* @__PURE__ */ T(h, {
838
836
  variant: "outline",
839
837
  className: "text-xs",
840
838
  children: e.type
841
- }), e.required && /* @__PURE__ */ T(_, {
839
+ }), e.required && /* @__PURE__ */ T(h, {
842
840
  variant: "destructive",
843
841
  className: "text-xs",
844
842
  children: P("botlit.promptTemplates.variables.requiredBadge", "required")
@@ -867,11 +865,11 @@ var P = ({ isNew: y }) => {
867
865
  children: P("botlit.promptTemplates.variables.none", "No variables declared")
868
866
  }) })] }) })]
869
867
  }),
870
- L === "preview" && /* @__PURE__ */ E(l, {
868
+ L === "preview" && /* @__PURE__ */ E(s, {
871
869
  role: "tabpanel",
872
870
  id: "prompt-template-panel-preview",
873
871
  "aria-labelledby": "prompt-template-tab-preview",
874
- children: [/* @__PURE__ */ E(f, { children: [/* @__PURE__ */ T(p, { children: P("botlit.promptTemplates.preview.title", "Filled with the first example input") }), /* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.preview.description", "Placeholders without an example value stay as written. Use Test render to check required values and types.") })] }), /* @__PURE__ */ T(u, { children: /* @__PURE__ */ T("div", {
872
+ children: [/* @__PURE__ */ E(u, { children: [/* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.preview.title", "Filled with the first example input") }), /* @__PURE__ */ T(l, { children: P("botlit.promptTemplates.preview.description", "Placeholders without an example value stay as written. Use Test render to check required values and types.") })] }), /* @__PURE__ */ T(c, { children: /* @__PURE__ */ T("div", {
875
873
  className: "whitespace-pre-wrap break-words rounded-lg bg-bg-sunken p-4 font-mono text-sm",
876
874
  children: $[0] ? be(I.templateText, $[0]) : /* @__PURE__ */ T("span", {
877
875
  className: "text-text-secondary",
@@ -884,14 +882,14 @@ var P = ({ isNew: y }) => {
884
882
  role: "tabpanel",
885
883
  id: "prompt-template-panel-test",
886
884
  "aria-labelledby": "prompt-template-tab-test",
887
- children: [/* @__PURE__ */ E(l, { children: [/* @__PURE__ */ E(f, { children: [/* @__PURE__ */ T(p, { children: P("botlit.promptTemplates.test.inputs", "Test inputs") }), /* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.test.description", "Fill in values to see the prompt exactly as the server builds it. Nothing is sent to a model; Prompt Studio does that.") })] }), /* @__PURE__ */ E(u, {
885
+ children: [/* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E(u, { children: [/* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.test.inputs", "Test inputs") }), /* @__PURE__ */ T(l, { children: P("botlit.promptTemplates.test.description", "Fill in values to see the prompt exactly as the server builds it. Nothing is sent to a model; Prompt Studio does that.") })] }), /* @__PURE__ */ E(c, {
888
886
  className: "space-y-4",
889
- children: [Q.map((e) => /* @__PURE__ */ T(h, {
887
+ children: [Q.map((e) => /* @__PURE__ */ T(p, {
890
888
  label: e.name,
891
889
  htmlFor: `tpl-test-${e.name}`,
892
890
  required: e.required,
893
891
  description: e.description,
894
- children: /* @__PURE__ */ T(g, {
892
+ children: /* @__PURE__ */ T(m, {
895
893
  id: `tpl-test-${e.name}`,
896
894
  maxLength: 1e4,
897
895
  placeholder: e.defaultValue === void 0 ? P("botlit.promptTemplates.test.enter", "Enter {{name}}", { name: e.name }) : N(e.defaultValue),
@@ -901,23 +899,23 @@ var P = ({ isNew: y }) => {
901
899
  [e.name]: t.target.value
902
900
  })
903
901
  })
904
- }, e.name)), /* @__PURE__ */ T(c, {
905
- permission: s.PROMPT_TEMPLATE_EXECUTE,
906
- children: /* @__PURE__ */ T(m, {
902
+ }, e.name)), /* @__PURE__ */ T(b, {
903
+ permission: y.PROMPT_TEMPLATE_EXECUTE,
904
+ children: /* @__PURE__ */ T(f, {
907
905
  className: "w-full",
908
- leftIcon: /* @__PURE__ */ T(O, { size: 16 }),
906
+ leftIcon: /* @__PURE__ */ T(D, { size: 16 }),
909
907
  onClick: () => void Pt(),
910
908
  isLoading: rt,
911
909
  children: P("botlit.promptTemplates.test.render", "Render template")
912
910
  })
913
911
  })]
914
- })] }), /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ T(f, { children: /* @__PURE__ */ T(p, { children: P("botlit.promptTemplates.test.output", "Output") }) }), /* @__PURE__ */ T(u, { children: pt ? /* @__PURE__ */ T("div", {
912
+ })] }), /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ T(u, { children: /* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.test.output", "Output") }) }), /* @__PURE__ */ T(c, { children: pt ? /* @__PURE__ */ T("div", {
915
913
  role: "alert",
916
914
  className: "flex items-start gap-2 rounded-lg border border-status-error-border/40 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
917
915
  children: /* @__PURE__ */ T("p", { children: pt })
918
916
  }) : dt === null ? /* @__PURE__ */ E("div", {
919
917
  className: "p-8 text-center text-text-secondary",
920
- children: [/* @__PURE__ */ T(O, {
918
+ children: [/* @__PURE__ */ T(D, {
921
919
  className: "mx-auto mb-2 h-8 w-8 opacity-50",
922
920
  "aria-hidden": "true"
923
921
  }), /* @__PURE__ */ T("p", { children: P("botlit.promptTemplates.test.empty", "Enter values and choose Render template to see the output.") })]
@@ -926,7 +924,7 @@ var P = ({ isNew: y }) => {
926
924
  children: dt
927
925
  }) })] })]
928
926
  }),
929
- $.length > 0 && L === "edit" && /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ E(f, { children: [/* @__PURE__ */ T(p, { children: P("botlit.promptTemplates.examples.title", "Example inputs") }), /* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.examples.description", "Sample values for documentation and the Example values tab") })] }), /* @__PURE__ */ T(u, { children: /* @__PURE__ */ T("div", {
927
+ $.length > 0 && L === "edit" && /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E(u, { children: [/* @__PURE__ */ T(d, { children: P("botlit.promptTemplates.examples.title", "Example inputs") }), /* @__PURE__ */ T(l, { children: P("botlit.promptTemplates.examples.description", "Sample values for documentation and the Example values tab") })] }), /* @__PURE__ */ T(c, { children: /* @__PURE__ */ T("div", {
930
928
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
931
929
  children: $.map((e, t) => /* @__PURE__ */ E("div", {
932
930
  className: "rounded-lg border bg-bg-sunken/30 p-4",
@@ -948,13 +946,13 @@ var P = ({ isNew: y }) => {
948
946
  })]
949
947
  }, t))
950
948
  }) })] }),
951
- /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ T(f, { children: /* @__PURE__ */ E(p, {
949
+ /* @__PURE__ */ E(s, { children: [/* @__PURE__ */ T(u, { children: /* @__PURE__ */ E(d, {
952
950
  className: "flex items-center gap-2",
953
- children: [/* @__PURE__ */ T(Be, {
951
+ children: [/* @__PURE__ */ T(Ve, {
954
952
  size: 18,
955
953
  "aria-hidden": "true"
956
954
  }), P("botlit.promptTemplates.metadata.title", "Details")]
957
- }) }), /* @__PURE__ */ T(u, { children: /* @__PURE__ */ E("dl", {
955
+ }) }), /* @__PURE__ */ T(c, { children: /* @__PURE__ */ E("dl", {
958
956
  className: "grid grid-cols-2 gap-6 text-sm md:grid-cols-4",
959
957
  children: [
960
958
  /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
@@ -976,7 +974,7 @@ var P = ({ isNew: y }) => {
976
974
  children: P("botlit.promptTemplates.metadata.tags", "Tags")
977
975
  }), /* @__PURE__ */ T("dd", {
978
976
  className: "flex flex-wrap gap-1",
979
- children: I.tags.length > 0 ? I.tags.map((e) => /* @__PURE__ */ T(_, {
977
+ children: I.tags.length > 0 ? I.tags.map((e) => /* @__PURE__ */ T(h, {
980
978
  variant: "secondary",
981
979
  className: "text-xs",
982
980
  children: e
@@ -988,7 +986,7 @@ var P = ({ isNew: y }) => {
988
986
  /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
989
987
  className: "text-text-secondary",
990
988
  children: P("botlit.promptTemplates.metadata.studio", "Versions")
991
- }), /* @__PURE__ */ T("dd", { children: /* @__PURE__ */ T(m, {
989
+ }), /* @__PURE__ */ T("dd", { children: /* @__PURE__ */ T(f, {
992
990
  variant: "ghost",
993
991
  size: "sm",
994
992
  className: "px-0",