@bikdotai/bik-component-library 0.0.852 → 0.0.853

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 (79) hide show
  1. package/dist/cjs/components/agent-builder/AgentBuilder.js +1 -1
  2. package/dist/cjs/components/agent-builder/AgentBuilder.js.map +1 -1
  3. package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js +1 -1
  4. package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
  5. package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js +1 -1
  6. package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
  7. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +5 -5
  8. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  9. package/dist/cjs/components/agent-builder/components/GoLiveModal.js +1 -1
  10. package/dist/cjs/components/agent-builder/components/GoLiveModal.js.map +1 -1
  11. package/dist/cjs/components/agent-builder/components/MentionPicker.js +24 -24
  12. package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
  13. package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js +1 -1
  14. package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
  15. package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js +2 -2
  16. package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
  17. package/dist/cjs/components/agent-builder/components/SelectableListSection.js +1 -1
  18. package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
  19. package/dist/cjs/components/agent-builder/constants/tools.js +1 -1
  20. package/dist/cjs/components/agent-builder/constants/tools.js.map +1 -1
  21. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
  22. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  23. package/dist/cjs/components/agent-builder/utils/sourceIcons.js +1 -1
  24. package/dist/cjs/components/agent-builder/utils/sourceIcons.js.map +1 -1
  25. package/dist/cjs/components/agent-listing/AgentTableRow.js +1 -1
  26. package/dist/cjs/components/agent-listing/AgentTableRow.js.map +1 -1
  27. package/dist/cjs/components/agent-listing/AiAgentsEmptyState.js +1 -1
  28. package/dist/cjs/components/agent-listing/AiAgentsEmptyState.js.map +1 -1
  29. package/dist/cjs/components/zeroState/ZeroState.js +3 -3
  30. package/dist/cjs/components/zeroState/ZeroState.js.map +1 -1
  31. package/dist/cjs/editor/BikEditor.js +1 -1
  32. package/dist/cjs/editor/BikEditor.js.map +1 -1
  33. package/dist/cjs/editor/BikEditor.styles.js +22 -16
  34. package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
  35. package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js +3 -3
  36. package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
  37. package/dist/esm/components/agent-builder/AgentBuilder.js +146 -136
  38. package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
  39. package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +7 -2
  40. package/dist/esm/components/agent-builder/components/AgentBuilderFooter.d.ts +2 -0
  41. package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js +29 -26
  42. package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
  43. package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js +30 -29
  44. package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
  45. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.d.ts +9 -0
  46. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +199 -184
  47. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  48. package/dist/esm/components/agent-builder/components/GoLiveModal.js +11 -13
  49. package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +1 -1
  50. package/dist/esm/components/agent-builder/components/MentionPicker.js +174 -150
  51. package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
  52. package/dist/esm/components/agent-builder/components/RequireVerificationModal.js +8 -8
  53. package/dist/esm/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
  54. package/dist/esm/components/agent-builder/components/RestApiToolPanel.js +54 -51
  55. package/dist/esm/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
  56. package/dist/esm/components/agent-builder/components/SelectableListSection.js +73 -69
  57. package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
  58. package/dist/esm/components/agent-builder/constants/tools.d.ts +20 -0
  59. package/dist/esm/components/agent-builder/constants/tools.js +34 -23
  60. package/dist/esm/components/agent-builder/constants/tools.js.map +1 -1
  61. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +270 -255
  62. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  63. package/dist/esm/components/agent-builder/utils/sourceIcons.d.ts +6 -6
  64. package/dist/esm/components/agent-builder/utils/sourceIcons.js +21 -19
  65. package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
  66. package/dist/esm/components/agent-listing/AgentTableRow.js +26 -23
  67. package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
  68. package/dist/esm/components/agent-listing/AiAgentsEmptyState.js +3 -2
  69. package/dist/esm/components/agent-listing/AiAgentsEmptyState.js.map +1 -1
  70. package/dist/esm/components/zeroState/ZeroState.d.ts +2 -0
  71. package/dist/esm/components/zeroState/ZeroState.js +18 -17
  72. package/dist/esm/components/zeroState/ZeroState.js.map +1 -1
  73. package/dist/esm/editor/BikEditor.js +236 -223
  74. package/dist/esm/editor/BikEditor.js.map +1 -1
  75. package/dist/esm/editor/BikEditor.styles.js +18 -12
  76. package/dist/esm/editor/BikEditor.styles.js.map +1 -1
  77. package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js +62 -60
  78. package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
  79. package/package.json +1 -1
@@ -1,29 +1,29 @@
1
- import { jsxs as le, Fragment as Ne, jsx as c } from "react/jsx-runtime";
2
- import { useState as i, useRef as y, useMemo as Ge, useCallback as l } from "react";
3
- import Be from "styled-components";
4
- import { addUnique as ce } from "../../../utils/arrayUtils.js";
5
- import { COLORS as W } from "../../../constants/Theme.js";
6
- import { AGENT_CHAR_LIMITS as Le } from "../constants/charLimits.js";
7
- import { CONFIG_TOOL_SOURCES as Pe, ToolSource as u } from "../constants/tools.js";
8
- import { buildAgentMentionItems as ze, buildCustomToolMentionItems as He, restApiMentionItem as Ue, configToolMentionItem as $e, restApiToolName as Fe, configToolName as je, toolSourceLabel as We } from "../utils/mentionSerialization.js";
9
- import { sourceIcon as Y, SOURCE_ICONS as ue, renderSourceIcon as de } from "../utils/sourceIcons.js";
10
- import { buildToolActions as Ye } from "../utils/toolActions.js";
11
- import { ConfigToolPanel as Xe } from "./ConfigToolPanel.js";
12
- import { DRAWER_BODY_STYLE as Ze, DRAWER_HEADER_STYLE as qe, DrawerHeaderText as Je } from "./DrawerHeaderText.js";
13
- import { MentionEditor as me } from "./MentionEditor.js";
14
- import { RestApiToolPanel as Qe } from "./RestApiToolPanel.js";
15
- import { SelectableListSection as Ve } from "./SelectableListSection.js";
16
- import { SideModal as et } from "../../side-modal/SideModal.js";
17
- import { Input as tt } from "../../input/Input.js";
18
- import { Toaster as ot } from "../../toaster/Toaster.js";
19
- const nt = 1e3, X = 1002, pe = (x, g) => {
1
+ import { jsxs as ue, Fragment as Be, jsx as c } from "react/jsx-runtime";
2
+ import { useState as i, useRef as y, useMemo as Le, useCallback as l } from "react";
3
+ import Pe from "styled-components";
4
+ import { addUnique as de } from "../../../utils/arrayUtils.js";
5
+ import { COLORS as Y } from "../../../constants/Theme.js";
6
+ import { AGENT_CHAR_LIMITS as ze } from "../constants/charLimits.js";
7
+ import { CONFIG_TOOL_SOURCES as He, ToolSource as u } from "../constants/tools.js";
8
+ import { buildAgentMentionItems as Ue, buildCustomToolMentionItems as $e, restApiMentionItem as Fe, configToolMentionItem as je, restApiToolName as We, configToolName as qe, toolSourceLabel as Ye } from "../utils/mentionSerialization.js";
9
+ import { sourceIcon as X, SOURCE_ICONS as me, renderSourceIcon as pe } from "../utils/sourceIcons.js";
10
+ import { buildToolActions as Xe } from "../utils/toolActions.js";
11
+ import { ConfigToolPanel as Ze } from "./ConfigToolPanel.js";
12
+ import { DRAWER_BODY_STYLE as Je, DRAWER_HEADER_STYLE as Qe, DrawerHeaderText as Ve } from "./DrawerHeaderText.js";
13
+ import { MentionEditor as fe } from "./MentionEditor.js";
14
+ import { RestApiToolPanel as et } from "./RestApiToolPanel.js";
15
+ import { SelectableListSection as tt } from "./SelectableListSection.js";
16
+ import { SideModal as ot } from "../../side-modal/SideModal.js";
17
+ import { Input as nt } from "../../input/Input.js";
18
+ import { Toaster as st } from "../../toaster/Toaster.js";
19
+ const rt = 1e3, Z = 1002, ge = (x, f) => {
20
20
  const s = x ?? [];
21
- return s.some((d) => d.id === g.id) ? s.map((d) => d.id === g.id ? g : d) : [...s, g];
22
- }, ge = Be.button`
21
+ return s.some((d) => d.id === f.id) ? s.map((d) => d.id === f.id ? f : d) : [...s, f];
22
+ }, he = Pe.button`
23
23
  align-self: flex-start;
24
- border: 1px solid ${W.stroke.primary};
25
- color: ${W.content.primary};
26
- background: ${W.surface.standard};
24
+ border: 1px solid ${Y.stroke.primary};
25
+ color: ${Y.content.primary};
26
+ background: ${Y.surface.standard};
27
27
  border-radius: 8px;
28
28
  padding: 6px 12px;
29
29
  font-size: 13px;
@@ -35,207 +35,218 @@ const nt = 1e3, X = 1002, pe = (x, g) => {
35
35
  cursor: default;
36
36
  opacity: 0.6;
37
37
  }
38
- `, St = ({
38
+ `, xt = ({
39
39
  onClose: x,
40
- onSave: g,
40
+ onSave: f,
41
41
  availableTools: s,
42
42
  onImprove: d,
43
- onImproveToolInstructions: Z,
44
- configToolTemplates: q,
45
- title: J = "Create sub-agent",
46
- initial: f,
47
- existingNames: fe = [],
48
- appLabel: Q = "Manifest",
49
- charLimits: b = Le
43
+ onImproveToolInstructions: J,
44
+ configToolTemplates: Q,
45
+ integrationStatus: A,
46
+ onConnectIntegration: R,
47
+ title: V = "Create sub-agent",
48
+ initial: g,
49
+ existingNames: ye = [],
50
+ appLabel: ee = "Manifest",
51
+ charLimits: b = ze
50
52
  }) => {
51
- const [E, he] = i(f?.name ?? ""), [T, A] = i(f?.instructions ?? ""), [C, R] = i(f?.guardrail ?? ""), [M, _] = i(f?.tools ?? []), [p, O] = i(
52
- f?.configTools ?? []
53
- ), [m, D] = i(
54
- f?.restApiTools ?? []
55
- ), [a, h] = i(null), w = y(0), [V, ee] = i(!1), [ye, K] = i(0), [be, N] = i(0), [I, te] = i(null), G = Ge(
53
+ const [O, be] = i(g?.name ?? ""), [T, _] = i(g?.instructions ?? ""), [C, w] = i(g?.guardrail ?? ""), [D, k] = i(g?.tools ?? []), [p, K] = i(
54
+ g?.configTools ?? []
55
+ ), [m, N] = i(
56
+ g?.restApiTools ?? []
57
+ ), [a, h] = i(null), E = y(0), [te, oe] = i(!1), [Te, G] = i(0), [Ce, B] = i(0), [v, ne] = i(null), L = Le(
56
58
  () => [
57
- ...ze(s, [], Q),
58
- ...He(p, m)
59
+ ...Ue(s, [], ee),
60
+ ...$e(p, m)
59
61
  ],
60
- [s, Q, p, m]
61
- ), k = y({}), B = y("instructions"), Te = l((e) => {
62
- k.current.instructions = e ?? void 0;
63
- }, []), Ce = l((e) => {
64
- k.current.guardrail = e ?? void 0;
65
- }, []), Ie = l(() => {
66
- B.current = "instructions";
62
+ [s, ee, p, m]
63
+ ), M = y({}), P = y("instructions"), ve = l((e) => {
64
+ M.current.instructions = e ?? void 0;
65
+ }, []), Ie = l((e) => {
66
+ M.current.guardrail = e ?? void 0;
67
67
  }, []), Se = l(() => {
68
- B.current = "guardrail";
69
- }, []), oe = y(/* @__PURE__ */ new Set());
70
- oe.current = new Set(
68
+ P.current = "instructions";
69
+ }, []), xe = l(() => {
70
+ P.current = "guardrail";
71
+ }, []), se = y(/* @__PURE__ */ new Set());
72
+ se.current = new Set(
71
73
  [...p, ...m].map((e) => e.id)
72
74
  );
73
- const ne = l(
75
+ const re = l(
74
76
  (e, t) => {
75
- e === "tool" && !oe.current.has(t) && _((o) => ce(o, t));
77
+ e === "tool" && !se.current.has(t) && k((o) => de(o, t));
76
78
  },
77
79
  []
78
- ), S = l(
80
+ ), I = l(
79
81
  (e, t, o) => {
80
- (k.current[B.current] ?? k.current.instructions)?.("tool", e, t, o);
82
+ (M.current[P.current] ?? M.current.instructions)?.("tool", e, t, o);
81
83
  },
82
84
  []
83
- ), L = l((e) => {
84
- w.current += 1, h({
85
- key: w.current,
85
+ ), z = l((e) => {
86
+ E.current += 1, h({
87
+ key: E.current,
86
88
  kind: "restapi",
87
89
  initialRest: e
88
90
  });
89
- }, []), P = l(
91
+ }, []), H = l(
90
92
  (e, t) => {
91
- w.current += 1, h({
92
- key: w.current,
93
+ E.current += 1, h({
94
+ key: E.current,
93
95
  kind: "config",
94
96
  toolKey: e,
95
97
  initialConfig: t
96
98
  });
97
99
  },
98
100
  []
99
- ), ve = l(
101
+ ), Ae = l(
100
102
  (e) => {
101
- const t = Pe[e];
102
- t ? P(t) : L();
103
+ const t = He[e];
104
+ t ? H(t) : z();
103
105
  },
104
- [P, L]
105
- ), xe = l(
106
+ [H, z]
107
+ ), Re = l(
106
108
  (e) => {
107
109
  const t = !m.some((o) => o.id === e.id);
108
- D((o) => pe(o, e)), t && S(
110
+ N((o) => ge(o, e)), t && I(
109
111
  e.id,
110
- Ue(e).label,
112
+ Fe(e).label,
111
113
  u.RestApi
112
114
  ), h(null);
113
115
  },
114
- [m, S]
115
- ), Ae = l(
116
+ [m, I]
117
+ ), _e = l(
116
118
  (e) => {
117
119
  const t = !p.some((o) => o.id === e.id);
118
- if (O((o) => pe(o, e)), t) {
120
+ if (K((o) => ge(o, e)), t) {
119
121
  const o = e.tool_key === "send_slack_message" ? u.Slack : u.EmailHandover;
120
- S(e.id, $e(e).label, o);
122
+ I(e.id, je(e).label, o);
121
123
  }
122
124
  h(null);
123
125
  },
124
- [p, S]
125
- ), [z, H] = i(
126
+ [p, I]
127
+ ), [U, $] = i(
126
128
  null
127
- ), U = y(null), se = y(0), Re = (e) => {
129
+ ), F = y(null), ie = y(0), we = (e) => {
128
130
  const t = s.find((n) => n.tool_id === e)?.display_name ?? m.find((n) => n.id === e)?.name ?? "Tool", o = `{{tool:${e}}}`, r = (n) => n.split(o).join("");
129
- U.current = {
131
+ F.current = {
130
132
  instructions: T,
131
133
  guardrail: C,
132
- tools: M,
134
+ tools: D,
133
135
  configTools: p,
134
136
  restApiTools: m
135
- }, A((n) => r(n)), R((n) => r(n)), _((n) => n.filter((v) => v !== e)), O((n) => n.filter((v) => v.id !== e)), D((n) => n.filter((v) => v.id !== e)), K((n) => n + 1), N((n) => n + 1), se.current += 1, H({ id: se.current, message: `Tool "${t}" removed` });
136
- }, _e = () => {
137
- const e = U.current;
138
- e && (A(e.instructions), R(e.guardrail), _(e.tools), O(e.configTools), D(e.restApiTools), K((t) => t + 1), N((t) => t + 1), U.current = null), H(null);
139
- }, $ = E.trim(), F = $.length > 0 && fe.some(
140
- (e) => e.trim().toLowerCase() === $.toLowerCase()
141
- ), re = $.length > 0 && !F && (T.trim().length > 0 || C.trim().length > 0), we = M.map((e) => {
137
+ }, _((n) => r(n)), w((n) => r(n)), k((n) => n.filter((S) => S !== e)), K((n) => n.filter((S) => S.id !== e)), N((n) => n.filter((S) => S.id !== e)), G((n) => n + 1), B((n) => n + 1), ie.current += 1, $({ id: ie.current, message: `Tool "${t}" removed` });
138
+ }, ke = () => {
139
+ const e = F.current;
140
+ e && (_(e.instructions), w(e.guardrail), k(e.tools), K(e.configTools), N(e.restApiTools), G((t) => t + 1), B((t) => t + 1), F.current = null), $(null);
141
+ }, j = O.trim(), W = j.length > 0 && ye.some(
142
+ (e) => e.trim().toLowerCase() === j.toLowerCase()
143
+ ), ae = j.length > 0 && !W && (T.trim().length > 0 || C.trim().length > 0), Ee = D.map((e) => {
142
144
  const t = s.find((o) => o.tool_id === e);
143
145
  return t ? {
144
146
  id: e,
145
147
  label: t.display_name,
146
- icon: Y(t.source ?? u.Manifest)
148
+ icon: X(t.source ?? u.Manifest),
149
+ // Shield flags a tool that needs customer verification, same as
150
+ // the main builder's Step 3 tool rows.
151
+ authRequired: t.auth_required
147
152
  } : null;
148
- }).filter((e) => e !== null), ke = m.map((e) => ({
153
+ }).filter((e) => e !== null), Me = m.map((e) => ({
149
154
  id: e.id,
150
- label: Fe(e),
151
- icon: ue[u.RestApi],
152
- onConfigure: () => L(e)
153
- })), Ee = p.map((e) => ({
155
+ label: We(e),
156
+ icon: me[u.RestApi],
157
+ onConfigure: () => z(e)
158
+ })), Oe = p.map((e) => ({
154
159
  id: e.id,
155
- label: je(e),
156
- icon: ue[e.tool_key === "send_slack_message" ? u.Slack : u.EmailHandover],
157
- onConfigure: () => P(e.tool_key, e)
158
- })), Me = [
159
- ...we,
160
- ...ke,
161
- ...Ee
162
- ], j = Ye(
163
- q,
164
- ve
165
- ), ie = a?.kind === "config" && a.toolKey ? q?.[a.toolKey] : void 0, Oe = s.map((e) => ({
160
+ label: qe(e),
161
+ icon: me[e.tool_key === "send_slack_message" ? u.Slack : u.EmailHandover],
162
+ onConfigure: () => H(e.tool_key, e)
163
+ })), De = [
164
+ ...Ee,
165
+ ...Me,
166
+ ...Oe
167
+ ], q = Xe(
168
+ Q,
169
+ Ae,
170
+ A,
171
+ R
172
+ ), le = a?.kind === "config" && a.toolKey ? Q?.[a.toolKey] : void 0, Ke = s.map((e) => ({
166
173
  label: e.display_name,
167
174
  value: e.tool_id,
168
- leadingIcon: de(Y(e.source ?? u.Manifest)) ?? void 0
169
- })), De = (() => {
175
+ leadingIcon: pe(X(e.source ?? u.Manifest)) ?? void 0
176
+ })), Ne = (() => {
170
177
  const e = [], t = /* @__PURE__ */ new Map();
171
178
  return s.forEach((o) => {
172
179
  const r = o.source ?? u.Manifest;
173
180
  t.has(r) || (t.set(r, []), e.push(r)), t.get(r)?.push({
174
181
  label: o.display_name,
175
182
  value: o.tool_id,
176
- leadingIcon: de(Y(o.source ?? u.Manifest)) ?? void 0
183
+ leadingIcon: pe(X(o.source ?? u.Manifest)) ?? void 0
177
184
  });
178
185
  }), e.map((o) => ({
179
186
  source: o,
180
- label: We(o),
181
- options: t.get(o) ?? []
187
+ label: Ye(o),
188
+ options: t.get(o) ?? [],
189
+ // Not connected → the source button opens the connect flow instead of
190
+ // its tool list (mirrors Step 3's tool section).
191
+ connected: A?.[o],
192
+ onConnect: () => R?.(o)
182
193
  }));
183
- })(), Ke = async () => {
184
- if (!re || V)
194
+ })(), Ge = async () => {
195
+ if (!ae || te)
185
196
  return;
186
- const e = g({
187
- name: E.trim(),
197
+ const e = f({
198
+ name: O.trim(),
188
199
  instructions: T,
189
200
  guardrail: C,
190
- tools: M,
201
+ tools: D,
191
202
  configTools: p,
192
203
  restApiTools: m
193
204
  });
194
205
  if (e && typeof e.then == "function") {
195
- ee(!0);
206
+ oe(!0);
196
207
  try {
197
208
  await e;
198
209
  } finally {
199
- ee(!1);
210
+ oe(!1);
200
211
  }
201
212
  }
202
- }, ae = async (e) => {
203
- if (!(!d || I)) {
204
- te(e);
213
+ }, ce = async (e) => {
214
+ if (!(!d || v)) {
215
+ ne(e);
205
216
  try {
206
217
  const o = await d(e, e === "instructions" ? T : C);
207
- e === "instructions" ? (A(o), K((r) => r + 1)) : (R(o), N((r) => r + 1));
218
+ e === "instructions" ? (_(o), G((r) => r + 1)) : (w(o), B((r) => r + 1));
208
219
  } finally {
209
- te(null);
220
+ ne(null);
210
221
  }
211
222
  }
212
223
  };
213
- return /* @__PURE__ */ le(Ne, { children: [
214
- /* @__PURE__ */ le(
215
- et,
224
+ return /* @__PURE__ */ ue(Be, { children: [
225
+ /* @__PURE__ */ ue(
226
+ ot,
216
227
  {
217
- header: J,
228
+ header: V,
218
229
  closeOnEscapeKey: !1,
219
- zIndex: nt,
230
+ zIndex: rt,
220
231
  headerCustomComponent: /* @__PURE__ */ c(
221
- Je,
232
+ Ve,
222
233
  {
223
- title: J,
234
+ title: V,
224
235
  subtitle: "Each sub-agent handles one piece of the job. Use @ in the main instructions to call them."
225
236
  }
226
237
  ),
227
238
  width: "421px",
228
- headerStyle: qe,
229
- bodyStyle: Ze,
239
+ headerStyle: Qe,
240
+ bodyStyle: Je,
230
241
  onClose: x,
231
242
  saveButtonProps: {
232
243
  "data-test": "subagent-save",
233
244
  buttonText: "Save",
234
245
  buttonType: "primary",
235
246
  size: "small",
236
- disabled: !re,
237
- isLoading: V,
238
- onClick: Ke
247
+ disabled: !ae,
248
+ isLoading: te,
249
+ onClick: Ge
239
250
  },
240
251
  cancelButtonProps: {
241
252
  "data-test": "subagent-cancel",
@@ -246,131 +257,135 @@ const nt = 1e3, X = 1002, pe = (x, g) => {
246
257
  },
247
258
  children: [
248
259
  /* @__PURE__ */ c(
249
- tt,
260
+ nt,
250
261
  {
251
262
  "data-test": "subagent-name",
252
263
  labelText: "Agent name",
253
264
  labelTextBold: !0,
254
265
  placeholder: "Enter agent name",
255
- value: E,
266
+ value: O,
256
267
  maxCharLimit: b.name,
257
268
  maxCharLimitPosition: "TOP",
258
269
  maxCharStyle: { fontSize: 12, lineHeight: "16px" },
259
- state: F ? "invalid" : void 0,
260
- errorMessage: F ? "A sub-agent with this name already exists" : void 0,
261
- onChangeText: he
270
+ state: W ? "invalid" : void 0,
271
+ errorMessage: W ? "A sub-agent with this name already exists" : void 0,
272
+ onChangeText: be
262
273
  }
263
274
  ),
264
275
  /* @__PURE__ */ c(
265
- me,
276
+ fe,
266
277
  {
267
278
  "data-test": "subagent-instructions",
268
279
  label: "Instructions",
269
280
  value: T,
270
- onChange: A,
281
+ onChange: _,
271
282
  maxLength: b.instructions,
272
283
  placeholder: "Write the steps in plain English. The agent will follow them exactly. The more specific you are, the better it performs.",
273
284
  minHeight: "160px",
274
- resetKey: `instr-${ye}`,
275
- mentionItems: G,
285
+ resetKey: `instr-${Te}`,
286
+ mentionItems: L,
276
287
  tools: s,
277
- toolActions: j,
278
- onMentionSelect: ne,
279
- onFocus: Ie,
280
- registerInsert: Te,
288
+ toolActions: q,
289
+ integrationStatus: A,
290
+ onConnectIntegration: R,
291
+ onMentionSelect: re,
292
+ onFocus: Se,
293
+ registerInsert: ve,
281
294
  action: d ? /* @__PURE__ */ c(
282
- ge,
295
+ he,
283
296
  {
284
297
  type: "button",
285
298
  "data-test": "subagent-improve-instructions",
286
- disabled: I !== null,
287
- onClick: () => ae("instructions"),
288
- children: I === "instructions" ? "Improving…" : "Improve with AI"
299
+ disabled: v !== null,
300
+ onClick: () => ce("instructions"),
301
+ children: v === "instructions" ? "Improving…" : "Improve with AI"
289
302
  }
290
303
  ) : void 0
291
304
  }
292
305
  ),
293
306
  /* @__PURE__ */ c(
294
- me,
307
+ fe,
295
308
  {
296
309
  "data-test": "subagent-guardrail",
297
310
  label: "Guardrails",
298
311
  value: C,
299
- onChange: R,
312
+ onChange: w,
300
313
  maxLength: b.guardrail,
301
314
  placeholder: "e.g. Never discuss competitor pricing. Always stay within the cancellation policy. Do not process refunds above ₹10,000 without human approval.",
302
315
  minHeight: "160px",
303
- resetKey: `guard-${be}`,
304
- mentionItems: G,
316
+ resetKey: `guard-${Ce}`,
317
+ mentionItems: L,
305
318
  tools: s,
306
- toolActions: j,
307
- onMentionSelect: ne,
308
- onFocus: Se,
309
- registerInsert: Ce,
319
+ toolActions: q,
320
+ integrationStatus: A,
321
+ onConnectIntegration: R,
322
+ onMentionSelect: re,
323
+ onFocus: xe,
324
+ registerInsert: Ie,
310
325
  action: d ? /* @__PURE__ */ c(
311
- ge,
326
+ he,
312
327
  {
313
328
  type: "button",
314
329
  "data-test": "subagent-improve-guardrail",
315
- disabled: I !== null,
316
- onClick: () => ae("guardrail"),
317
- children: I === "guardrail" ? "Improving…" : "Improve with AI"
330
+ disabled: v !== null,
331
+ onClick: () => ce("guardrail"),
332
+ children: v === "guardrail" ? "Improving…" : "Improve with AI"
318
333
  }
319
334
  ) : void 0
320
335
  }
321
336
  ),
322
337
  /* @__PURE__ */ c(
323
- Ve,
338
+ tt,
324
339
  {
325
340
  title: "Tools this agent can use",
326
341
  dataTestPrefix: "subagent-tools",
327
- items: Me,
328
- addableOptions: Oe,
329
- sourceGroups: De,
330
- mentionItems: G,
331
- actionSources: j,
342
+ items: De,
343
+ addableOptions: Ke,
344
+ sourceGroups: Ne,
345
+ mentionItems: L,
346
+ actionSources: q,
332
347
  emptyText: "No tools added yet.",
333
348
  pickerOpensUp: !0,
334
349
  onAdd: (e) => {
335
- S(e), _((t) => ce(t, e));
350
+ I(e), k((t) => de(t, e));
336
351
  },
337
- onRemove: Re,
338
- confirmDelete: { noun: "tool", zIndex: X + 1 }
352
+ onRemove: we,
353
+ confirmDelete: { noun: "tool", zIndex: Z + 1 }
339
354
  }
340
355
  )
341
356
  ]
342
357
  }
343
358
  ),
344
359
  a?.kind === "restapi" && /* @__PURE__ */ c(
345
- Qe,
360
+ et,
346
361
  {
347
362
  initial: a.initialRest,
348
363
  charLimits: b,
349
- onImprove: Z,
364
+ onImprove: J,
350
365
  onClose: () => h(null),
351
- onSave: xe,
352
- zIndex: X
366
+ onSave: Re,
367
+ zIndex: Z
353
368
  },
354
369
  a.key
355
370
  ),
356
- a?.kind === "config" && a.toolKey && ie && /* @__PURE__ */ c(
357
- Xe,
371
+ a?.kind === "config" && a.toolKey && le && /* @__PURE__ */ c(
372
+ Ze,
358
373
  {
359
374
  toolKey: a.toolKey,
360
- template: ie,
375
+ template: le,
361
376
  initial: a.initialConfig,
362
377
  charLimits: b,
363
- onImprove: Z,
378
+ onImprove: J,
364
379
  onClose: () => h(null),
365
- onSave: Ae,
366
- zIndex: X
380
+ onSave: _e,
381
+ zIndex: Z
367
382
  },
368
383
  a.key
369
384
  ),
370
- z && /* @__PURE__ */ c(
371
- ot,
385
+ U && /* @__PURE__ */ c(
386
+ st,
372
387
  {
373
- text: z.message,
388
+ text: U.message,
374
389
  type: "info",
375
390
  position: "top-right",
376
391
  autoClose: 5e3,
@@ -378,15 +393,15 @@ const nt = 1e3, X = 1002, pe = (x, g) => {
378
393
  buttonProps: {
379
394
  buttonText: "Undo",
380
395
  showButton: !0,
381
- onButtonClick: () => (_e(), {})
396
+ onButtonClick: () => (ke(), {})
382
397
  },
383
- onCloseToast: () => H(null)
398
+ onCloseToast: () => $(null)
384
399
  },
385
- z.id
400
+ U.id
386
401
  )
387
402
  ] });
388
403
  };
389
404
  export {
390
- St as CreateSubAgentPanel
405
+ xt as CreateSubAgentPanel
391
406
  };
392
407
  //# sourceMappingURL=CreateSubAgentPanel.js.map