@bikdotai/bik-component-library 0.0.831-beta.1 → 0.0.831-beta.3

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 (74) hide show
  1. package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js +6 -6
  2. package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
  3. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +2 -2
  4. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  5. package/dist/cjs/components/agent-builder/components/DrawerHeaderText.js +3 -3
  6. package/dist/cjs/components/agent-builder/components/DrawerHeaderText.js.map +1 -1
  7. package/dist/cjs/components/agent-builder/components/MentionField.js +1 -1
  8. package/dist/cjs/components/agent-builder/components/MentionField.js.map +1 -1
  9. package/dist/cjs/components/agent-builder/components/MentionPicker.js +19 -19
  10. package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
  11. package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js +4 -4
  12. package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
  13. package/dist/cjs/components/agent-builder/components/SelectableListSection.js +4 -4
  14. package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
  15. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
  16. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  17. package/dist/cjs/components/agent-builder/utils/sourceIcons.js +1 -1
  18. package/dist/cjs/components/agent-builder/utils/sourceIcons.js.map +1 -1
  19. package/dist/cjs/components/agent-builder/utils/toolActions.js +2 -0
  20. package/dist/cjs/components/agent-builder/utils/toolActions.js.map +1 -0
  21. package/dist/cjs/components/states-modal/DeleteConfirmationModal.js +1 -1
  22. package/dist/cjs/components/states-modal/DeleteConfirmationModal.js.map +1 -1
  23. package/dist/cjs/icons/Media/Visual/{FormkitNeutral.js → Frame26086263.js} +1 -1
  24. package/dist/cjs/icons/Media/Visual/Frame26086263.js.map +1 -0
  25. package/dist/cjs/icons/Media/Visual/{FormkitSad.js → IconTrailing.js} +1 -1
  26. package/dist/cjs/icons/Media/Visual/IconTrailing.js.map +1 -0
  27. package/dist/cjs/icons/Social/Social/SlackIcon.js +2 -0
  28. package/dist/cjs/icons/Social/Social/SlackIcon.js.map +1 -0
  29. package/dist/cjs/icons/index.js +1 -1
  30. package/dist/esm/components/agent-builder/components/ConfigToolPanel.js +92 -101
  31. package/dist/esm/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
  32. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +149 -154
  33. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  34. package/dist/esm/components/agent-builder/components/DrawerHeaderText.d.ts +2 -9
  35. package/dist/esm/components/agent-builder/components/DrawerHeaderText.js +15 -19
  36. package/dist/esm/components/agent-builder/components/DrawerHeaderText.js.map +1 -1
  37. package/dist/esm/components/agent-builder/components/MentionField.js +57 -66
  38. package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
  39. package/dist/esm/components/agent-builder/components/MentionPicker.js +66 -55
  40. package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
  41. package/dist/esm/components/agent-builder/components/RestApiToolPanel.js +77 -80
  42. package/dist/esm/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
  43. package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +10 -0
  44. package/dist/esm/components/agent-builder/components/SelectableListSection.js +134 -118
  45. package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
  46. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +144 -148
  47. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  48. package/dist/esm/components/agent-builder/utils/sourceIcons.js +14 -14
  49. package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
  50. package/dist/esm/components/agent-builder/utils/toolActions.d.ts +11 -0
  51. package/dist/esm/components/agent-builder/utils/toolActions.js +15 -0
  52. package/dist/esm/components/agent-builder/utils/toolActions.js.map +1 -0
  53. package/dist/esm/components/states-modal/DeleteConfirmationModal.d.ts +2 -0
  54. package/dist/esm/components/states-modal/DeleteConfirmationModal.js +11 -10
  55. package/dist/esm/components/states-modal/DeleteConfirmationModal.js.map +1 -1
  56. package/dist/esm/icons/Media/Visual/Frame26086263.d.ts +7 -0
  57. package/dist/esm/icons/Media/Visual/{FormkitNeutral.js → Frame26086263.js} +1 -1
  58. package/dist/esm/icons/Media/Visual/Frame26086263.js.map +1 -0
  59. package/dist/esm/icons/Media/Visual/IconTrailing.d.ts +7 -0
  60. package/dist/esm/icons/Media/Visual/{FormkitSad.js → IconTrailing.js} +1 -1
  61. package/dist/esm/icons/Media/Visual/IconTrailing.js.map +1 -0
  62. package/dist/esm/icons/Media/Visual/index.d.ts +2 -2
  63. package/dist/esm/icons/Social/Social/SlackIcon.d.ts +7 -0
  64. package/dist/esm/icons/Social/Social/SlackIcon.js +47 -0
  65. package/dist/esm/icons/Social/Social/SlackIcon.js.map +1 -0
  66. package/dist/esm/icons/Social/Social/index.d.ts +1 -0
  67. package/dist/esm/icons/index.d.ts +25 -25
  68. package/dist/esm/icons/index.js +246 -244
  69. package/dist/esm/icons/index.js.map +1 -1
  70. package/package.json +1 -1
  71. package/dist/cjs/icons/Media/Visual/FormkitNeutral.js.map +0 -1
  72. package/dist/cjs/icons/Media/Visual/FormkitSad.js.map +0 -1
  73. package/dist/esm/icons/Media/Visual/FormkitNeutral.js.map +0 -1
  74. package/dist/esm/icons/Media/Visual/FormkitSad.js.map +0 -1
@@ -1,24 +1,25 @@
1
- import { jsxs as rt, Fragment as Kt, jsx as c } from "react/jsx-runtime";
2
- import { useState as r, useRef as A, useMemo as Lt, useCallback as a } from "react";
3
- import Nt from "styled-components";
1
+ import { jsxs as rt, Fragment as Ot, jsx as c } from "react/jsx-runtime";
2
+ import { useState as r, useRef as v, useMemo as wt, useCallback as a } from "react";
3
+ import Kt from "styled-components";
4
4
  import { addUnique as it } from "../../../utils/arrayUtils.js";
5
5
  import { COLORS as F } from "../../../constants/Theme.js";
6
- import { AGENT_CHAR_LIMITS as wt } from "../constants/charLimits.js";
7
- import { CONFIG_TOOL_SOURCES as lt, ToolSource as p, TOOL_ACTION_SOURCES as Bt, TOOL_ACTION_LABELS as Dt, TOOL_SOURCE_LABELS as Gt } from "../constants/tools.js";
8
- import { buildAgentMentionItems as Pt, buildCustomToolMentionItems as Ut, restApiMentionItem as zt, configToolMentionItem as Ht, restApiToolName as $t, configToolName as Ft, toolSourceLabel as jt } from "../utils/mentionSerialization.js";
9
- import { sourceIcon as j, SOURCE_ICONS as W, renderSourceIcon as at } from "../utils/sourceIcons.js";
10
- import { ConfigToolPanel as Wt } from "./ConfigToolPanel.js";
11
- import { DRAWER_BODY_STYLE as Yt, DRAWER_HEADER_STYLE as Xt, DrawerHeaderText as Zt } from "./DrawerHeaderText.js";
6
+ import { AGENT_CHAR_LIMITS as Nt } from "../constants/charLimits.js";
7
+ import { CONFIG_TOOL_SOURCES as Dt, ToolSource as p } from "../constants/tools.js";
8
+ import { buildAgentMentionItems as Gt, buildCustomToolMentionItems as Bt, restApiMentionItem as Pt, configToolMentionItem as zt, restApiToolName as Lt, configToolName as Ht, toolSourceLabel as Ut } from "../utils/mentionSerialization.js";
9
+ import { sourceIcon as j, SOURCE_ICONS as lt, renderSourceIcon as at } from "../utils/sourceIcons.js";
10
+ import { buildToolActions as $t } from "../utils/toolActions.js";
11
+ import { ConfigToolPanel as Ft } from "./ConfigToolPanel.js";
12
+ import { DRAWER_BODY_STYLE as jt, DRAWER_HEADER_STYLE as Wt, DrawerHeaderText as Yt } from "./DrawerHeaderText.js";
12
13
  import { MentionEditor as ct } from "./MentionEditor.js";
13
- import { RestApiToolPanel as qt } from "./RestApiToolPanel.js";
14
- import { SelectableListSection as Jt } from "./SelectableListSection.js";
15
- import { SideModal as Qt } from "../../side-modal/SideModal.js";
16
- import { Input as Vt } from "../../input/Input.js";
17
- import { Toaster as te } from "../../toaster/Toaster.js";
18
- const ee = 1e3, ut = 1002, dt = (v, f) => {
19
- const s = v ?? [];
14
+ import { RestApiToolPanel as Xt } from "./RestApiToolPanel.js";
15
+ import { SelectableListSection as Zt } from "./SelectableListSection.js";
16
+ import { SideModal as qt } from "../../side-modal/SideModal.js";
17
+ import { Input as Jt } from "../../input/Input.js";
18
+ import { Toaster as Qt } from "../../toaster/Toaster.js";
19
+ const Vt = 1e3, W = 1002, ut = (x, f) => {
20
+ const s = x ?? [];
20
21
  return s.some((u) => u.id === f.id) ? s.map((u) => u.id === f.id ? f : u) : [...s, f];
21
- }, mt = Nt.button`
22
+ }, dt = Kt.button`
22
23
  align-self: flex-start;
23
24
  border: 1px solid ${F.stroke.primary};
24
25
  color: ${F.content.primary};
@@ -34,8 +35,8 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
34
35
  cursor: default;
35
36
  opacity: 0.6;
36
37
  }
37
- `, be = ({
38
- onClose: v,
38
+ `, To = ({
39
+ onClose: x,
39
40
  onSave: f,
40
41
  availableTools: s,
41
42
  onImprove: u,
@@ -44,138 +45,131 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
44
45
  title: Z = "Create sub-agent",
45
46
  initial: g,
46
47
  appLabel: q = "Manifest",
47
- charLimits: h = wt
48
+ charLimits: h = Nt
48
49
  }) => {
49
- const [k, pt] = r(g?.name ?? ""), [T, x] = r(g?.instructions ?? ""), [b, _] = r(g?.guardrail ?? ""), [M, R] = r(g?.tools ?? []), [m, K] = r(
50
+ const [M, mt] = r(g?.name ?? ""), [b, A] = r(g?.instructions ?? ""), [T, R] = r(g?.guardrail ?? ""), [O, _] = r(g?.tools ?? []), [m, w] = r(
50
51
  g?.configTools ?? []
51
- ), [d, L] = r(
52
+ ), [d, K] = r(
52
53
  g?.restApiTools ?? []
53
- ), [i, y] = r(null), O = A(0), [J, Q] = r(!1), [ft, N] = r(0), [gt, w] = r(0), [S, V] = r(null), B = Lt(
54
+ ), [i, y] = r(null), E = v(0), [J, Q] = r(!1), [pt, N] = r(0), [ft, D] = r(0), [I, V] = r(null), G = wt(
54
55
  () => [
55
- ...Pt(s, [], q),
56
- ...Ut(m, d)
56
+ ...Gt(s, [], q),
57
+ ...Bt(m, d)
57
58
  ],
58
59
  [s, q, m, d]
59
- ), E = A({}), D = A("instructions"), yt = a((t) => {
60
- E.current.instructions = t ?? void 0;
61
- }, []), ht = a((t) => {
62
- E.current.guardrail = t ?? void 0;
63
- }, []), Tt = a(() => {
64
- D.current = "instructions";
60
+ ), k = v({}), B = v("instructions"), gt = a((t) => {
61
+ k.current.instructions = t ?? void 0;
62
+ }, []), yt = a((t) => {
63
+ k.current.guardrail = t ?? void 0;
64
+ }, []), ht = a(() => {
65
+ B.current = "instructions";
65
66
  }, []), bt = a(() => {
66
- D.current = "guardrail";
67
+ B.current = "guardrail";
67
68
  }, []), tt = a(
68
- (t, e) => {
69
- t === "tool" && R((o) => it(o, e));
69
+ (t, o) => {
70
+ t === "tool" && _((e) => it(e, o));
70
71
  },
71
72
  []
72
- ), C = a((t, e) => {
73
- (E.current[D.current] ?? E.current.instructions)?.("tool", t, e);
74
- }, []), G = a((t) => {
75
- O.current += 1, y({
76
- key: O.current,
73
+ ), C = a((t, o) => {
74
+ (k.current[B.current] ?? k.current.instructions)?.("tool", t, o);
75
+ }, []), P = a((t) => {
76
+ E.current += 1, y({
77
+ key: E.current,
77
78
  kind: "restapi",
78
79
  initialRest: t
79
80
  });
80
- }, []), P = a(
81
- (t, e) => {
82
- O.current += 1, y({
83
- key: O.current,
81
+ }, []), z = a(
82
+ (t, o) => {
83
+ E.current += 1, y({
84
+ key: E.current,
84
85
  kind: "config",
85
86
  toolKey: t,
86
- initialConfig: e
87
+ initialConfig: o
87
88
  });
88
89
  },
89
90
  []
90
- ), St = a(
91
+ ), Tt = a(
91
92
  (t) => {
92
- const e = lt[t];
93
- e ? P(e) : G();
93
+ const o = Dt[t];
94
+ o ? z(o) : P();
94
95
  },
95
- [P, G]
96
- ), Ct = a(
96
+ [z, P]
97
+ ), It = a(
97
98
  (t) => {
98
- const e = !d.some((o) => o.id === t.id);
99
- L((o) => dt(o, t)), e && C(t.id, zt(t).label), y(null);
99
+ const o = !d.some((e) => e.id === t.id);
100
+ K((e) => ut(e, t)), o && C(t.id, Pt(t).label), y(null);
100
101
  },
101
102
  [d, C]
102
- ), It = a(
103
+ ), Ct = a(
103
104
  (t) => {
104
- const e = !m.some((o) => o.id === t.id);
105
- K((o) => dt(o, t)), e && C(t.id, Ht(t).label), y(null);
105
+ const o = !m.some((e) => e.id === t.id);
106
+ w((e) => ut(e, t)), o && C(t.id, zt(t).label), y(null);
106
107
  },
107
108
  [m, C]
108
- ), [U, z] = r(
109
+ ), [L, H] = r(
109
110
  null
110
- ), H = A(null), et = A(0), At = (t) => {
111
- const e = s.find((n) => n.tool_id === t)?.display_name ?? d.find((n) => n.id === t)?.name ?? "Tool", o = `{{tool:${t}}}`, l = (n) => n.split(o).join("");
112
- H.current = {
113
- instructions: T,
114
- guardrail: b,
115
- tools: M,
111
+ ), U = v(null), ot = v(0), St = (t) => {
112
+ const o = s.find((n) => n.tool_id === t)?.display_name ?? d.find((n) => n.id === t)?.name ?? "Tool", e = `{{tool:${t}}}`, l = (n) => n.split(e).join("");
113
+ U.current = {
114
+ instructions: b,
115
+ guardrail: T,
116
+ tools: O,
116
117
  configTools: m,
117
118
  restApiTools: d
118
- }, x((n) => l(n)), _((n) => l(n)), R((n) => n.filter((I) => I !== t)), K((n) => n.filter((I) => I.id !== t)), L((n) => n.filter((I) => I.id !== t)), N((n) => n + 1), w((n) => n + 1), et.current += 1, z({ id: et.current, message: `Tool "${e}" removed` });
119
+ }, A((n) => l(n)), R((n) => l(n)), _((n) => n.filter((S) => S !== t)), w((n) => n.filter((S) => S.id !== t)), K((n) => n.filter((S) => S.id !== t)), N((n) => n + 1), D((n) => n + 1), ot.current += 1, H({ id: ot.current, message: `Tool "${o}" removed` });
119
120
  }, vt = () => {
120
- const t = H.current;
121
- t && (x(t.instructions), _(t.guardrail), R(t.tools), K(t.configTools), L(t.restApiTools), N((e) => e + 1), w((e) => e + 1), H.current = null), z(null);
122
- }, ot = k.trim().length > 0 && (T.trim().length > 0 || b.trim().length > 0), xt = M.map((t) => {
123
- const e = s.find((o) => o.tool_id === t);
124
- return e ? {
121
+ const t = U.current;
122
+ t && (A(t.instructions), R(t.guardrail), _(t.tools), w(t.configTools), K(t.restApiTools), N((o) => o + 1), D((o) => o + 1), U.current = null), H(null);
123
+ }, et = M.trim().length > 0 && (b.trim().length > 0 || T.trim().length > 0), xt = O.map((t) => {
124
+ const o = s.find((e) => e.tool_id === t);
125
+ return o ? {
125
126
  id: t,
126
- label: e.display_name,
127
- icon: j(e.source ?? p.Manifest)
127
+ label: o.display_name,
128
+ icon: j(o.source ?? p.Manifest)
128
129
  } : null;
129
- }).filter((t) => t !== null), _t = d.map((t) => ({
130
+ }).filter((t) => t !== null), At = d.map((t) => ({
130
131
  id: t.id,
131
- label: $t(t),
132
- icon: W[p.RestApi],
133
- onConfigure: () => G(t)
132
+ label: Lt(t),
133
+ icon: lt[p.RestApi],
134
+ onConfigure: () => P(t)
134
135
  })), Rt = m.map((t) => ({
135
136
  id: t.id,
136
- label: Ft(t),
137
- icon: W[t.tool_key === "send_slack_message" ? p.Slack : p.EmailHandover],
138
- onConfigure: () => P(t.tool_key, t)
139
- })), Ot = [
137
+ label: Ht(t),
138
+ icon: lt[t.tool_key === "send_slack_message" ? p.Slack : p.EmailHandover],
139
+ onConfigure: () => z(t.tool_key, t)
140
+ })), _t = [
140
141
  ...xt,
141
- ..._t,
142
+ ...At,
142
143
  ...Rt
143
- ], $ = Bt.filter(
144
- (t) => {
145
- const e = lt[t];
146
- return !e || !!X?.[e];
147
- }
148
- ).map((t) => ({
149
- source: t,
150
- label: Dt[t] ?? Gt[t],
151
- icon: W[t],
152
- onSelect: () => St(t)
153
- })), nt = i?.kind === "config" && i.toolKey ? X?.[i.toolKey] : void 0, Et = s.map((t) => ({
144
+ ], $ = $t(
145
+ X,
146
+ Tt
147
+ ), nt = i?.kind === "config" && i.toolKey ? X?.[i.toolKey] : void 0, Et = s.map((t) => ({
154
148
  label: t.display_name,
155
149
  value: t.tool_id,
156
150
  leadingIcon: at(j(t.source ?? p.Manifest)) ?? void 0
157
151
  })), kt = (() => {
158
- const t = [], e = /* @__PURE__ */ new Map();
159
- return s.forEach((o) => {
160
- const l = o.source ?? p.Manifest;
161
- e.has(l) || (e.set(l, []), t.push(l)), e.get(l)?.push({
162
- label: o.display_name,
163
- value: o.tool_id,
164
- leadingIcon: at(j(o.source ?? p.Manifest)) ?? void 0
152
+ const t = [], o = /* @__PURE__ */ new Map();
153
+ return s.forEach((e) => {
154
+ const l = e.source ?? p.Manifest;
155
+ o.has(l) || (o.set(l, []), t.push(l)), o.get(l)?.push({
156
+ label: e.display_name,
157
+ value: e.tool_id,
158
+ leadingIcon: at(j(e.source ?? p.Manifest)) ?? void 0
165
159
  });
166
- }), t.map((o) => ({
167
- source: o,
168
- label: jt(o),
169
- options: e.get(o) ?? []
160
+ }), t.map((e) => ({
161
+ source: e,
162
+ label: Ut(e),
163
+ options: o.get(e) ?? []
170
164
  }));
171
165
  })(), Mt = async () => {
172
- if (!ot || J)
166
+ if (!et || J)
173
167
  return;
174
168
  const t = f({
175
- name: k.trim(),
176
- instructions: T,
177
- guardrail: b,
178
- tools: M,
169
+ name: M.trim(),
170
+ instructions: b,
171
+ guardrail: T,
172
+ tools: O,
179
173
  configTools: m,
180
174
  restApiTools: d
181
175
  });
@@ -188,40 +182,40 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
188
182
  }
189
183
  }
190
184
  }, st = async (t) => {
191
- if (!(!u || S)) {
185
+ if (!(!u || I)) {
192
186
  V(t);
193
187
  try {
194
- const o = await u(t, t === "instructions" ? T : b);
195
- t === "instructions" ? (x(o), N((l) => l + 1)) : (_(o), w((l) => l + 1));
188
+ const e = await u(t, t === "instructions" ? b : T);
189
+ t === "instructions" ? (A(e), N((l) => l + 1)) : (R(e), D((l) => l + 1));
196
190
  } finally {
197
191
  V(null);
198
192
  }
199
193
  }
200
194
  };
201
- return /* @__PURE__ */ rt(Kt, { children: [
195
+ return /* @__PURE__ */ rt(Ot, { children: [
202
196
  /* @__PURE__ */ rt(
203
- Qt,
197
+ qt,
204
198
  {
205
199
  header: Z,
206
200
  closeOnEscapeKey: !1,
207
- zIndex: ee,
201
+ zIndex: Vt,
208
202
  headerCustomComponent: /* @__PURE__ */ c(
209
- Zt,
203
+ Yt,
210
204
  {
211
205
  title: Z,
212
206
  subtitle: "Each sub-agent handles one piece of the job. Use @ in the main instructions to call them."
213
207
  }
214
208
  ),
215
209
  width: "421px",
216
- headerStyle: Xt,
217
- bodyStyle: Yt,
218
- onClose: v,
210
+ headerStyle: Wt,
211
+ bodyStyle: jt,
212
+ onClose: x,
219
213
  saveButtonProps: {
220
214
  "data-test": "subagent-save",
221
215
  buttonText: "Save",
222
216
  buttonType: "primary",
223
217
  size: "small",
224
- disabled: !ot,
218
+ disabled: !et,
225
219
  isLoading: J,
226
220
  onClick: Mt
227
221
  },
@@ -230,21 +224,21 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
230
224
  buttonText: "Cancel",
231
225
  buttonType: "tertiaryGray",
232
226
  size: "small",
233
- onClick: v
227
+ onClick: x
234
228
  },
235
229
  children: [
236
230
  /* @__PURE__ */ c(
237
- Vt,
231
+ Jt,
238
232
  {
239
233
  "data-test": "subagent-name",
240
234
  labelText: "Agent name",
241
235
  labelTextBold: !0,
242
236
  placeholder: "Enter agent name",
243
- value: k,
237
+ value: M,
244
238
  maxCharLimit: h.name,
245
239
  maxCharLimitPosition: "TOP",
246
240
  maxCharStyle: { fontSize: 12, lineHeight: "16px" },
247
- onChangeText: pt
241
+ onChangeText: mt
248
242
  }
249
243
  ),
250
244
  /* @__PURE__ */ c(
@@ -252,26 +246,26 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
252
246
  {
253
247
  "data-test": "subagent-instructions",
254
248
  label: "Instructions",
255
- value: T,
256
- onChange: x,
249
+ value: b,
250
+ onChange: A,
257
251
  maxLength: h.instructions,
258
252
  placeholder: "Write the steps in plain English. Type @ to reference a tool.",
259
253
  minHeight: "160px",
260
- resetKey: `instr-${ft}`,
261
- mentionItems: B,
254
+ resetKey: `instr-${pt}`,
255
+ mentionItems: G,
262
256
  tools: s,
263
257
  toolActions: $,
264
258
  onMentionSelect: tt,
265
- onFocus: Tt,
266
- registerInsert: yt,
259
+ onFocus: ht,
260
+ registerInsert: gt,
267
261
  action: u ? /* @__PURE__ */ c(
268
- mt,
262
+ dt,
269
263
  {
270
264
  type: "button",
271
265
  "data-test": "subagent-improve-instructions",
272
- disabled: S !== null,
266
+ disabled: I !== null,
273
267
  onClick: () => st("instructions"),
274
- children: S === "instructions" ? "Improving…" : "Improve with AI"
268
+ children: I === "instructions" ? "Improving…" : "Improve with AI"
275
269
  }
276
270
  ) : void 0
277
271
  }
@@ -281,64 +275,65 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
281
275
  {
282
276
  "data-test": "subagent-guardrail",
283
277
  label: "Guardrails",
284
- value: b,
285
- onChange: _,
278
+ value: T,
279
+ onChange: R,
286
280
  maxLength: h.guardrail,
287
281
  placeholder: "e.g. Never discuss competitor pricing. Type @ to reference a tool.",
288
282
  minHeight: "160px",
289
- resetKey: `guard-${gt}`,
290
- mentionItems: B,
283
+ resetKey: `guard-${ft}`,
284
+ mentionItems: G,
291
285
  tools: s,
292
286
  toolActions: $,
293
287
  onMentionSelect: tt,
294
288
  onFocus: bt,
295
- registerInsert: ht,
289
+ registerInsert: yt,
296
290
  action: u ? /* @__PURE__ */ c(
297
- mt,
291
+ dt,
298
292
  {
299
293
  type: "button",
300
294
  "data-test": "subagent-improve-guardrail",
301
- disabled: S !== null,
295
+ disabled: I !== null,
302
296
  onClick: () => st("guardrail"),
303
- children: S === "guardrail" ? "Improving…" : "Improve with AI"
297
+ children: I === "guardrail" ? "Improving…" : "Improve with AI"
304
298
  }
305
299
  ) : void 0
306
300
  }
307
301
  ),
308
302
  /* @__PURE__ */ c(
309
- Jt,
303
+ Zt,
310
304
  {
311
305
  title: "Tools this agent can use",
312
306
  dataTestPrefix: "subagent-tools",
313
- items: Ot,
307
+ items: _t,
314
308
  addableOptions: Et,
315
309
  sourceGroups: kt,
316
- mentionItems: B,
310
+ mentionItems: G,
317
311
  actionSources: $,
318
312
  emptyText: "No tools added yet.",
319
313
  onAdd: (t) => {
320
- C(t), R((e) => it(e, t));
314
+ C(t), _((o) => it(o, t));
321
315
  },
322
- onRemove: At
316
+ onRemove: St,
317
+ confirmDelete: { noun: "tool", zIndex: W + 1 }
323
318
  }
324
319
  )
325
320
  ]
326
321
  }
327
322
  ),
328
323
  i?.kind === "restapi" && /* @__PURE__ */ c(
329
- qt,
324
+ Xt,
330
325
  {
331
326
  initial: i.initialRest,
332
327
  charLimits: h,
333
328
  onImprove: Y,
334
329
  onClose: () => y(null),
335
- onSave: Ct,
336
- zIndex: ut
330
+ onSave: It,
331
+ zIndex: W
337
332
  },
338
333
  i.key
339
334
  ),
340
335
  i?.kind === "config" && i.toolKey && nt && /* @__PURE__ */ c(
341
- Wt,
336
+ Ft,
342
337
  {
343
338
  toolKey: i.toolKey,
344
339
  template: nt,
@@ -346,15 +341,15 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
346
341
  charLimits: h,
347
342
  onImprove: Y,
348
343
  onClose: () => y(null),
349
- onSave: It,
350
- zIndex: ut
344
+ onSave: Ct,
345
+ zIndex: W
351
346
  },
352
347
  i.key
353
348
  ),
354
- U && /* @__PURE__ */ c(
355
- te,
349
+ L && /* @__PURE__ */ c(
350
+ Qt,
356
351
  {
357
- text: U.message,
352
+ text: L.message,
358
353
  type: "info",
359
354
  position: "top-right",
360
355
  autoClose: 5e3,
@@ -364,13 +359,13 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
364
359
  showButton: !0,
365
360
  onButtonClick: () => (vt(), {})
366
361
  },
367
- onCloseToast: () => z(null)
362
+ onCloseToast: () => H(null)
368
363
  },
369
- U.id
364
+ L.id
370
365
  )
371
366
  ] });
372
367
  };
373
368
  export {
374
- be as CreateSubAgentPanel
369
+ To as CreateSubAgentPanel
375
370
  };
376
371
  //# sourceMappingURL=CreateSubAgentPanel.js.map