@bikdotai/bik-component-library 0.0.849-beta.2 → 0.0.849

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 (75) 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/AgentBuilder.styled.js +28 -16
  4. package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -1
  5. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +2 -2
  6. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  7. package/dist/cjs/components/agent-builder/components/MentionEditor.js +1 -1
  8. package/dist/cjs/components/agent-builder/components/MentionEditor.js.map +1 -1
  9. package/dist/cjs/components/agent-builder/components/MentionField.js +1 -1
  10. package/dist/cjs/components/agent-builder/components/MentionField.js.map +1 -1
  11. package/dist/cjs/components/agent-builder/components/MentionPicker.js +11 -11
  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/SelectableListSection.js +1 -1
  16. package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
  17. package/dist/cjs/components/agent-builder/constants/tools.js +1 -1
  18. package/dist/cjs/components/agent-builder/constants/tools.js.map +1 -1
  19. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
  20. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.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/mentionSerialization.js +4 -4
  24. package/dist/cjs/components/agent-builder/utils/mentionSerialization.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/editor/BikEditor.styles.js +0 -6
  28. package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
  29. package/dist/cjs/icons/Informational/Common UI/ShieldOutline.js +2 -0
  30. package/dist/cjs/icons/Informational/Common UI/ShieldOutline.js.map +1 -0
  31. package/dist/cjs/icons/index.js +1 -1
  32. package/dist/esm/components/agent-builder/AgentBuilder.js +69 -71
  33. package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
  34. package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +0 -8
  35. package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +3 -0
  36. package/dist/esm/components/agent-builder/AgentBuilder.styled.js +46 -33
  37. package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
  38. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.d.ts +0 -3
  39. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +110 -113
  40. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  41. package/dist/esm/components/agent-builder/components/MentionEditor.d.ts +0 -7
  42. package/dist/esm/components/agent-builder/components/MentionEditor.js +74 -89
  43. package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
  44. package/dist/esm/components/agent-builder/components/MentionField.js +26 -28
  45. package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
  46. package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +1 -14
  47. package/dist/esm/components/agent-builder/components/MentionPicker.js +138 -167
  48. package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
  49. package/dist/esm/components/agent-builder/components/RequireVerificationModal.js +5 -5
  50. package/dist/esm/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
  51. package/dist/esm/components/agent-builder/components/SelectableListSection.js +72 -63
  52. package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
  53. package/dist/esm/components/agent-builder/constants/tools.d.ts +1 -1
  54. package/dist/esm/components/agent-builder/constants/tools.js +5 -6
  55. package/dist/esm/components/agent-builder/constants/tools.js.map +1 -1
  56. package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +0 -7
  57. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +96 -99
  58. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
  59. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +174 -165
  60. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  61. package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +4 -14
  62. package/dist/esm/components/agent-builder/utils/mentionSerialization.js +38 -50
  63. package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  64. package/dist/esm/components/agent-listing/AgentTableRow.js +1 -1
  65. package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
  66. package/dist/esm/editor/BikEditor.styles.js +0 -6
  67. package/dist/esm/editor/BikEditor.styles.js.map +1 -1
  68. package/dist/esm/icons/Informational/Common UI/ShieldOutline.d.ts +7 -0
  69. package/dist/esm/icons/Informational/Common UI/ShieldOutline.js +35 -0
  70. package/dist/esm/icons/Informational/Common UI/ShieldOutline.js.map +1 -0
  71. package/dist/esm/icons/Informational/Common UI/index.d.ts +1 -0
  72. package/dist/esm/icons/index.d.ts +25 -25
  73. package/dist/esm/icons/index.js +172 -170
  74. package/dist/esm/icons/index.js.map +1 -1
  75. package/package.json +1 -1
@@ -1,104 +1,104 @@
1
- import { jsxs as d, jsx as i, Fragment as He } from "react/jsx-runtime";
2
- import { useState as k, useRef as Z, useCallback as s, useEffect as U } from "react";
3
- import { TitleSmall as ee, BodyCaption as Le, BodySecondary as oe } from "../../TypographyStyle.js";
1
+ import { jsxs as d, jsx as n, Fragment as Le } from "react/jsx-runtime";
2
+ import { useState as k, useRef as ee, useCallback as s, useEffect as U } from "react";
3
+ import { TitleSmall as oe, BodyCaption as Ke, BodySecondary as te } from "../../TypographyStyle.js";
4
4
  import { COLORS as A } from "../../../constants/Theme.js";
5
- import { Step3Root as Ke, Step3Grid as qe, SectionBodyWrap as te, Step3Divider as Be, SideSection as ne, SideSectionHeader as Fe } from "../AgentBuilder.styled.js";
6
- import { ConfigToolPanel as Ge } from "../components/ConfigToolPanel.js";
7
- import { CreateSubAgentPanel as Ue } from "../components/CreateSubAgentPanel.js";
8
- import { MentionField as ie } from "../components/MentionField.js";
9
- import { RequireVerificationModal as We } from "../components/RequireVerificationModal.js";
10
- import { RestApiToolPanel as ze } from "../components/RestApiToolPanel.js";
11
- import { SelectableListSection as le } from "../components/SelectableListSection.js";
12
- import { StepSectionHeader as Ve } from "../components/StepSectionHeader.js";
13
- import { STEP_DEFINITIONS as je } from "../constants/steps.js";
14
- import { CONFIG_TOOL_SOURCES as $e, ToolSource as S } from "../constants/tools.js";
15
- import { useAgentBuilderContext as Je } from "../context/AgentBuilderContext.js";
16
- import { restApiMentionItem as Qe, configToolMentionItem as Xe, restApiToolName as Ye, configToolName as Ze, toolSourceLabel as eo, buildAgentMentionItems as ae, buildCustomToolMentionItems as oo, appTypeLabel as se } from "../utils/mentionSerialization.js";
17
- import { sourceIcon as fe, SOURCE_ICONS as re, renderSourceIcon as to } from "../utils/sourceIcons.js";
18
- import { buildToolActions as no } from "../utils/toolActions.js";
19
- import io from "../../../icons/Informational/Common UI/Shield.js";
20
- import { Switch as lo } from "../../switch/Switch.js";
21
- import { Dropdown as ce } from "../../dropdown/Dropdown.js";
22
- import { unwrapDropdownValue as de } from "../../dropdown/utils.js";
23
- const ao = (t) => to(fe(t)) ?? void 0, ue = (t) => ({
5
+ import { Step3Root as qe, Step3Grid as Be, SectionBodyWrap as ne, Step3Divider as Fe, SideSection as ie, SideSectionHeader as Ge } from "../AgentBuilder.styled.js";
6
+ import { ConfigToolPanel as Ue } from "../components/ConfigToolPanel.js";
7
+ import { CreateSubAgentPanel as We } from "../components/CreateSubAgentPanel.js";
8
+ import { MentionField as le } from "../components/MentionField.js";
9
+ import { RequireVerificationModal as ze } from "../components/RequireVerificationModal.js";
10
+ import { RestApiToolPanel as Ve } from "../components/RestApiToolPanel.js";
11
+ import { SelectableListSection as ae } from "../components/SelectableListSection.js";
12
+ import { StepSectionHeader as je } from "../components/StepSectionHeader.js";
13
+ import { STEP_DEFINITIONS as $e } from "../constants/steps.js";
14
+ import { CONFIG_TOOL_SOURCES as Je, ToolSource as T } from "../constants/tools.js";
15
+ import { useAgentBuilderContext as Qe } from "../context/AgentBuilderContext.js";
16
+ import { restApiMentionItem as Xe, configToolMentionItem as Ye, restApiToolName as Ze, configToolName as eo, toolSourceLabel as oo, buildAgentMentionItems as se, buildCustomToolMentionItems as to, appTypeLabel as re } from "../utils/mentionSerialization.js";
17
+ import { sourceIcon as ge, SOURCE_ICONS as ce, renderSourceIcon as no } from "../utils/sourceIcons.js";
18
+ import { buildToolActions as io } from "../utils/toolActions.js";
19
+ import lo from "../../../icons/Informational/Common UI/Shield.js";
20
+ import { Dropdown as de } from "../../dropdown/Dropdown.js";
21
+ import { unwrapDropdownValue as ue } from "../../dropdown/utils.js";
22
+ import { Tooltip as ao } from "../../tooltips/Tooltip.js";
23
+ import { Switch as so } from "../../switch/Switch.js";
24
+ const ro = (t) => no(ge(t)) ?? void 0, pe = (t) => ({
24
25
  label: t.display_name,
25
26
  value: t.tool_id,
26
- leadingIcon: ao(t.source ?? S.Manifest)
27
- }), pe = je[2], W = [
27
+ leadingIcon: ro(t.source ?? T.Manifest)
28
+ }), me = $e[2], W = [
28
29
  { label: "OTP to phone", value: "phone_otp" },
29
30
  { label: "OTP to email", value: "email_otp" }
30
- ], me = (t, l) => {
31
- const y = t ?? [];
32
- return y.some((u) => u.id === l.id) ? y.map((u) => u.id === l.id ? l : u) : [...y, l];
33
- }, Mo = () => {
31
+ ], fe = (t, l) => {
32
+ const S = t ?? [];
33
+ return S.some((u) => u.id === l.id) ? S.map((u) => u.id === l.id ? l : u) : [...S, l];
34
+ }, No = () => {
34
35
  const {
35
36
  value: t,
36
37
  patch: l,
37
- updateField: y,
38
+ updateField: S,
38
39
  addReference: u,
39
40
  removeReference: z,
40
41
  availableTools: r,
41
- availableSubAgents: ge,
42
- availableModels: M,
43
- configToolTemplates: x,
42
+ availableSubAgents: he,
43
+ availableModels: x,
44
+ configToolTemplates: M,
44
45
  applicationType: V,
45
- charLimits: T,
46
+ charLimits: v,
46
47
  insertMention: c,
47
- onCreateSubAgent: m,
48
+ onCreateSubAgent: f,
48
49
  onFetchSubAgent: I,
49
50
  onUpdateSubAgent: E,
50
- onImproveSubAgent: he,
51
+ onImproveSubAgent: be,
51
52
  onImproveToolInstructions: N,
52
53
  registerSubAgentCreator: P,
53
54
  registerToolActionHandler: D,
54
55
  integrationStatus: j,
55
- onConnectIntegration: $,
56
- variablesData: be
57
- } = Je(), [p, C] = k(null), w = Z(0), [a, f] = k(null), O = Z(0), H = s((e) => {
58
- O.current += 1, f({
59
- key: O.current,
56
+ onConnectIntegration: $
57
+ } = Qe(), [p, C] = k(null), w = ee(0), [a, g] = k(null), R = ee(0), H = s((e) => {
58
+ R.current += 1, g({
59
+ key: R.current,
60
60
  kind: "restapi",
61
61
  initialRest: e
62
62
  });
63
63
  }, []), L = s(
64
64
  (e, o) => {
65
- O.current += 1, f({
66
- key: O.current,
65
+ R.current += 1, g({
66
+ key: R.current,
67
67
  kind: "config",
68
68
  toolKey: e,
69
69
  initialConfig: o
70
70
  });
71
71
  },
72
72
  []
73
- ), Se = s(
73
+ ), ye = s(
74
74
  (e) => {
75
- const o = !(t.restApiTools ?? []).some((n) => n.id === e.id);
76
- l({ restApiTools: me(t.restApiTools, e) }), o && c("tool", e.id, Qe(e).label), f(null);
75
+ const o = !(t.restApiTools ?? []).some((i) => i.id === e.id);
76
+ l({ restApiTools: fe(t.restApiTools, e) }), o && c("tool", e.id, Xe(e).label), g(null);
77
77
  },
78
78
  [l, t.restApiTools, c]
79
- ), ye = s(
79
+ ), Te = s(
80
80
  (e) => {
81
- const o = !(t.configTools ?? []).some((n) => n.id === e.id);
82
- l({ configTools: me(t.configTools, e) }), o && c("tool", e.id, Xe(e).label), f(null);
81
+ const o = !(t.configTools ?? []).some((i) => i.id === e.id);
82
+ l({ configTools: fe(t.configTools, e) }), o && c("tool", e.id, Ye(e).label), g(null);
83
83
  },
84
84
  [l, t.configTools, c]
85
85
  ), K = s(
86
86
  (e) => {
87
- const o = $e[e];
87
+ const o = Je[e];
88
88
  o ? L(o) : H();
89
89
  },
90
90
  [L, H]
91
91
  );
92
92
  U(() => (D(K), () => D(null)), [D, K]);
93
- const [Te, J] = k([]), R = /* @__PURE__ */ new Map();
94
- ge.forEach((e) => R.set(e.id, e)), Te.forEach((e) => R.set(e.id, e));
95
- const Q = Array.from(R.values()), q = s(() => {
93
+ const [Se, J] = k([]), O = /* @__PURE__ */ new Map();
94
+ he.forEach((e) => O.set(e.id, e)), Se.forEach((e) => O.set(e.id, e));
95
+ const Q = Array.from(O.values()), q = s(() => {
96
96
  w.current += 1, C({ key: w.current, title: "Create sub-agent" });
97
97
  }, []);
98
98
  U(() => {
99
- if (m)
99
+ if (f)
100
100
  return P(q), () => P(null);
101
- }, [P, q, m]);
101
+ }, [P, q, f]);
102
102
  const ve = s(
103
103
  async (e) => {
104
104
  if (!I)
@@ -117,31 +117,31 @@ const ao = (t) => to(fe(t)) ?? void 0, ue = (t) => ({
117
117
  if (p?.editingId) {
118
118
  if (E) {
119
119
  const o = await E(p.editingId, e);
120
- J((n) => [
121
- ...n.filter((b) => b.id !== o.id),
120
+ J((i) => [
121
+ ...i.filter((y) => y.id !== o.id),
122
122
  o
123
123
  ]);
124
124
  }
125
- } else if (m) {
126
- const o = await m(e);
127
- J((n) => [...n, o]), l({ subagents: [...t.subagents, o.id] }), c("subagent", o.id, `sub-agent: ${o.name}`);
125
+ } else if (f) {
126
+ const o = await f(e);
127
+ J((i) => [...i, o]), l({ subagents: [...t.subagents, o.id] }), c("subagent", o.id, `sub-agent: ${o.name}`);
128
128
  }
129
129
  C(null);
130
130
  },
131
131
  [
132
132
  p,
133
133
  E,
134
- m,
134
+ f,
135
135
  l,
136
136
  t.subagents,
137
137
  c
138
138
  ]
139
- ), g = t.tools.some(
139
+ ), m = t.tools.some(
140
140
  (e) => r.find((o) => o.tool_id === e)?.auth_required
141
- ), h = t.authentication?.enabled ?? !1, v = t.authentication?.type ?? "email_otp";
141
+ ), h = t.authentication?.enabled ?? !1, b = t.authentication?.type ?? "email_otp";
142
142
  U(() => {
143
- g && !h && l({ authentication: { enabled: !0, type: v } });
144
- }, [g, h, v, l]);
143
+ m && !h && l({ authentication: { enabled: !0, type: b } });
144
+ }, [m, h, b, l]);
145
145
  const [_, B] = k(null), F = s(
146
146
  (e) => {
147
147
  c("tool", e), u("tool", e);
@@ -149,7 +149,7 @@ const ao = (t) => to(fe(t)) ?? void 0, ue = (t) => ({
149
149
  [c, u]
150
150
  ), Ie = s(
151
151
  (e) => {
152
- if (r.find((n) => n.tool_id === e)?.auth_required && !h) {
152
+ if (r.find((i) => i.tool_id === e)?.auth_required && !h) {
153
153
  B(e);
154
154
  return;
155
155
  }
@@ -157,106 +157,123 @@ const ao = (t) => to(fe(t)) ?? void 0, ue = (t) => ({
157
157
  },
158
158
  [r, h, F]
159
159
  ), Ce = t.tools.map((e) => {
160
- const o = r.find((n) => n.tool_id === e);
160
+ const o = r.find((i) => i.tool_id === e);
161
161
  return o ? {
162
162
  id: e,
163
163
  label: o.display_name,
164
- icon: fe(o.source ?? S.Manifest),
164
+ icon: ge(o.source ?? T.Manifest),
165
165
  authRequired: o.auth_required
166
166
  } : null;
167
167
  }).filter((e) => e !== null), we = (t.restApiTools ?? []).map(
168
168
  (e) => ({
169
169
  id: e.id,
170
- label: Ye(e),
171
- icon: re[S.RestApi],
170
+ label: Ze(e),
171
+ icon: ce[T.RestApi],
172
172
  onConfigure: () => H(e)
173
173
  })
174
- ), Oe = (t.configTools ?? []).map(
174
+ ), Re = (t.configTools ?? []).map(
175
175
  (e) => ({
176
176
  id: e.id,
177
- label: Ze(e),
178
- icon: re[e.tool_key === "send_slack_message" ? S.Slack : S.EmailHandover],
177
+ label: eo(e),
178
+ icon: ce[e.tool_key === "send_slack_message" ? T.Slack : T.EmailHandover],
179
179
  onConfigure: () => L(e.tool_key, e)
180
180
  })
181
- ), Re = [
181
+ ), Oe = [
182
182
  ...Ce,
183
183
  ...we,
184
- ...Oe
185
- ], _e = no(
186
- x,
184
+ ...Re
185
+ ], _e = io(
186
+ M,
187
187
  K,
188
188
  j,
189
189
  $
190
- ), ke = r.map(ue), Me = (() => {
190
+ ), ke = r.map(pe), xe = (() => {
191
191
  const e = [], o = /* @__PURE__ */ new Map();
192
- return r.forEach((n) => {
193
- const b = n.source ?? S.Manifest;
194
- o.has(b) || (o.set(b, []), e.push(b)), o.get(b)?.push(ue(n));
195
- }), e.map((n) => ({
196
- source: n,
197
- label: eo(n),
198
- options: o.get(n) ?? [],
192
+ return r.forEach((i) => {
193
+ const y = i.source ?? T.Manifest;
194
+ o.has(y) || (o.set(y, []), e.push(y)), o.get(y)?.push(pe(i));
195
+ }), e.map((i) => ({
196
+ source: i,
197
+ label: oo(i),
198
+ options: o.get(i) ?? [],
199
199
  // Not connected → the source button opens the connect flow instead of
200
200
  // its tool list (see SelectableListSection / onConnectIntegration).
201
- connected: j?.[n],
202
- onConnect: () => $?.(n)
201
+ connected: j?.[i],
202
+ onConnect: () => $?.(i)
203
203
  }));
204
- })(), xe = t.subagents.map((e) => {
205
- const o = R.get(e);
204
+ })(), Me = t.subagents.map((e) => {
205
+ const o = O.get(e);
206
206
  return o ? { id: e, label: o.name } : null;
207
207
  }).filter((e) => e !== null), Ee = Q.map((e) => ({
208
208
  label: e.name,
209
209
  value: e.id
210
- })), X = se(V), Ne = [
211
- ...ae(r, [], X),
212
- ...oo(t.configTools, t.restApiTools)
213
- ], Pe = ae(
210
+ })), X = re(V), Ne = [
211
+ ...se(r, [], X),
212
+ ...to(t.configTools, t.restApiTools)
213
+ ], Pe = se(
214
214
  [],
215
215
  Q,
216
216
  X
217
- ), De = M.map((e) => ({
217
+ ), De = x.map((e) => ({
218
218
  label: e.label,
219
219
  value: e.value,
220
220
  selected: e.value === t.model
221
- })), G = M.find((e) => e.value === t.model), Y = a?.kind === "config" && a.toolKey ? x?.[a.toolKey] : void 0;
222
- return /* @__PURE__ */ d(Ke, { children: [
223
- /* @__PURE__ */ i(Ve, { title: pe.title, helper: pe.helper }),
224
- /* @__PURE__ */ d(qe, { $grow: !0, children: [
225
- /* @__PURE__ */ d(te, { children: [
226
- /* @__PURE__ */ i(
227
- ie,
221
+ })), G = x.find((e) => e.value === t.model), Y = a?.kind === "config" && a.toolKey ? M?.[a.toolKey] : void 0, Z = /* @__PURE__ */ n(
222
+ so,
223
+ {
224
+ "data-test": "agent-auth-toggle",
225
+ value: h || m,
226
+ disabled: m,
227
+ onValueChange: async (e) => {
228
+ l({ authentication: { enabled: e, type: b } });
229
+ }
230
+ }
231
+ ), He = m ? /* @__PURE__ */ n(
232
+ ao,
233
+ {
234
+ body: "Remove tools that requires customer verification to change this setting.",
235
+ placement: "bottom",
236
+ children: /* @__PURE__ */ n("span", { style: { display: "flex" }, children: Z })
237
+ }
238
+ ) : Z;
239
+ return /* @__PURE__ */ d(qe, { children: [
240
+ /* @__PURE__ */ n(je, { title: me.title, helper: me.helper }),
241
+ /* @__PURE__ */ d(Be, { $grow: !0, children: [
242
+ /* @__PURE__ */ d(ne, { children: [
243
+ /* @__PURE__ */ n(
244
+ le,
228
245
  {
229
246
  fieldKey: "instructions",
230
247
  "data-test": "agent-instructions",
231
248
  label: "Instructions",
232
- maxLength: T.instructions,
249
+ maxLength: v.instructions,
233
250
  placeholder: "Write the steps in plain English. The agent will follow them exactly. The more specific you are, the better it performs.",
234
251
  minHeight: "200px"
235
252
  }
236
253
  ),
237
- /* @__PURE__ */ i(
238
- ie,
254
+ /* @__PURE__ */ n(
255
+ le,
239
256
  {
240
257
  fieldKey: "guardrail",
241
258
  "data-test": "agent-guardrail",
242
259
  label: "Guardrails",
243
- maxLength: T.guardrail,
260
+ maxLength: v.guardrail,
244
261
  placeholder: "e.g. Never discuss competitor pricing. Always stay within the cancellation policy. Do not process refunds above ₹10,000 without human approval.",
245
262
  minHeight: "140px"
246
263
  }
247
264
  )
248
265
  ] }),
249
- /* @__PURE__ */ i(Be, {}),
250
- /* @__PURE__ */ d(te, { children: [
251
- /* @__PURE__ */ i(
252
- le,
266
+ /* @__PURE__ */ n(Fe, {}),
267
+ /* @__PURE__ */ d(ne, { children: [
268
+ /* @__PURE__ */ n(
269
+ ae,
253
270
  {
254
271
  title: "Tools",
255
272
  helper: "Actions this agent can take while responding.",
256
273
  dataTestPrefix: "agent-tools",
257
- items: Re,
274
+ items: Oe,
258
275
  addableOptions: ke,
259
- sourceGroups: Me,
276
+ sourceGroups: xe,
260
277
  mentionItems: Ne,
261
278
  actionSources: _e,
262
279
  emptyText: "No tools added yet.",
@@ -265,13 +282,13 @@ const ao = (t) => to(fe(t)) ?? void 0, ue = (t) => ({
265
282
  confirmDelete: { noun: "tool" }
266
283
  }
267
284
  ),
268
- /* @__PURE__ */ i(
269
- le,
285
+ /* @__PURE__ */ n(
286
+ ae,
270
287
  {
271
288
  title: "Sub-agents",
272
289
  helper: "Other agents this agent can hand off the conversation to.",
273
290
  dataTestPrefix: "agent-subagents",
274
- items: xe,
291
+ items: Me,
275
292
  addableOptions: Ee,
276
293
  mentionItems: Pe,
277
294
  emptyText: "No sub-agents added yet.",
@@ -281,44 +298,37 @@ const ao = (t) => to(fe(t)) ?? void 0, ue = (t) => ({
281
298
  onRemove: (e) => z("subagent", e),
282
299
  confirmDelete: { noun: "sub-agent" },
283
300
  onConfigure: I ? ve : void 0,
284
- createOption: m ? { label: "Create new", onSelect: q } : void 0
301
+ createOption: f ? { label: "Create new", onSelect: q } : void 0
285
302
  }
286
303
  ),
287
- /* @__PURE__ */ d(ne, { children: [
288
- /* @__PURE__ */ d(Fe, { children: [
304
+ /* @__PURE__ */ d(ie, { children: [
305
+ /* @__PURE__ */ d(Ge, { children: [
289
306
  /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
290
- /* @__PURE__ */ i(io, { size: 20 }),
291
- /* @__PURE__ */ i(ee, { color: A.content.primary, children: "Require customer verification" })
307
+ /* @__PURE__ */ n(lo, { size: 20 }),
308
+ /* @__PURE__ */ n(oe, { color: A.content.primary, children: "Require customer verification" })
292
309
  ] }),
293
- /* @__PURE__ */ i(
294
- lo,
295
- {
296
- "data-test": "agent-auth-toggle",
297
- value: h || g,
298
- disabled: g,
299
- onValueChange: async (e) => {
300
- l({ authentication: { enabled: e, type: v } });
301
- }
302
- }
303
- )
310
+ He
304
311
  ] }),
305
- /* @__PURE__ */ i(Le, { color: A.content.secondary, children: g ? "Required — this agent uses a tool that accesses customer order details." : "Customers must verify their identity before this agent responds." }),
306
- (h || g) && /* @__PURE__ */ d(He, { children: [
307
- /* @__PURE__ */ i(oe, { color: A.content.primary, children: "Select verification method" }),
308
- /* @__PURE__ */ i(
309
- ce,
312
+ /* @__PURE__ */ n(Ke, { color: A.content.secondary, children: m ? "Required — this agent uses a tool that accesses customer order details." : "Customers must verify their identity before this agent responds." }),
313
+ (h || m) && /* @__PURE__ */ d(Le, { children: [
314
+ /* @__PURE__ */ n(te, { color: A.content.primary, children: "Select verification method" }),
315
+ /* @__PURE__ */ n(
316
+ de,
310
317
  {
311
318
  "data-test": "agent-auth-method",
312
319
  size: "small",
313
320
  width: "100%",
314
321
  dropdownWidth: "328px",
315
322
  placeHolder: "Select verification method",
316
- options: W,
323
+ options: W.map((e) => ({
324
+ ...e,
325
+ selected: e.value === b
326
+ })),
317
327
  defaultOptions: [
318
- W.find((e) => e.value === v) ?? W[0]
328
+ W.find((e) => e.value === b) ?? W[0]
319
329
  ],
320
330
  onSelect: (e) => {
321
- const o = de(e);
331
+ const o = ue(e);
322
332
  o && l({
323
333
  authentication: {
324
334
  enabled: !0,
@@ -330,11 +340,11 @@ const ao = (t) => to(fe(t)) ?? void 0, ue = (t) => ({
330
340
  )
331
341
  ] })
332
342
  ] }),
333
- M.length > 0 && /* @__PURE__ */ d(ne, { children: [
334
- /* @__PURE__ */ i(ee, { color: A.content.primary, children: "Advanced settings" }),
335
- /* @__PURE__ */ i(oe, { color: A.content.primary, children: "Select AI model" }),
336
- /* @__PURE__ */ i(
337
- ce,
343
+ x.length > 0 && /* @__PURE__ */ d(ie, { children: [
344
+ /* @__PURE__ */ n(oe, { color: A.content.primary, children: "Advanced settings" }),
345
+ /* @__PURE__ */ n(te, { color: A.content.primary, children: "Select AI model" }),
346
+ /* @__PURE__ */ n(
347
+ de,
338
348
  {
339
349
  "data-test": "agent-model",
340
350
  size: "small",
@@ -349,70 +359,69 @@ const ao = (t) => to(fe(t)) ?? void 0, ue = (t) => ({
349
359
  }
350
360
  ] : void 0,
351
361
  onSelect: (e) => {
352
- const o = de(e);
353
- o && y("model", o);
362
+ const o = ue(e);
363
+ o && S("model", o);
354
364
  }
355
365
  }
356
366
  )
357
367
  ] })
358
368
  ] })
359
369
  ] }),
360
- p && /* @__PURE__ */ i(
361
- Ue,
370
+ p && /* @__PURE__ */ n(
371
+ We,
362
372
  {
363
373
  title: p.title,
364
374
  initial: p.initial,
365
375
  availableTools: r,
366
- configToolTemplates: x,
367
- variablesData: be,
368
- appLabel: se(V),
369
- charLimits: T,
370
- onImprove: he,
376
+ configToolTemplates: M,
377
+ appLabel: re(V),
378
+ charLimits: v,
379
+ onImprove: be,
371
380
  onImproveToolInstructions: N,
372
381
  onClose: () => C(null),
373
382
  onSave: Ae
374
383
  },
375
384
  p.key
376
385
  ),
377
- a?.kind === "restapi" && /* @__PURE__ */ i(
378
- ze,
386
+ a?.kind === "restapi" && /* @__PURE__ */ n(
387
+ Ve,
379
388
  {
380
389
  initial: a.initialRest,
381
- charLimits: T,
390
+ charLimits: v,
382
391
  existingNames: (t.restApiTools ?? []).filter((e) => e.id !== a.initialRest?.id).map((e) => e.name),
383
392
  onImprove: N,
384
- onClose: () => f(null),
385
- onSave: Se
393
+ onClose: () => g(null),
394
+ onSave: ye
386
395
  },
387
396
  a.key
388
397
  ),
389
- a?.kind === "config" && a.toolKey && Y && /* @__PURE__ */ i(
390
- Ge,
398
+ a?.kind === "config" && a.toolKey && Y && /* @__PURE__ */ n(
399
+ Ue,
391
400
  {
392
401
  toolKey: a.toolKey,
393
402
  template: Y,
394
403
  initial: a.initialConfig,
395
- charLimits: T,
404
+ charLimits: v,
396
405
  onImprove: N,
397
- onClose: () => f(null),
398
- onSave: ye
406
+ onClose: () => g(null),
407
+ onSave: Te
399
408
  },
400
409
  a.key
401
410
  ),
402
- /* @__PURE__ */ i(
403
- We,
411
+ /* @__PURE__ */ n(
412
+ ze,
404
413
  {
405
414
  open: _ !== null,
406
415
  toolLabel: r.find((e) => e.tool_id === _)?.display_name ?? "This tool",
407
416
  onCancel: () => B(null),
408
417
  onConfirm: () => {
409
- l({ authentication: { enabled: !0, type: v } }), _ && F(_), B(null);
418
+ l({ authentication: { enabled: !0, type: b } }), _ && F(_), B(null);
410
419
  }
411
420
  }
412
421
  )
413
422
  ] });
414
423
  };
415
424
  export {
416
- Mo as Step3HowItResponds
425
+ No as Step3HowItResponds
417
426
  };
418
427
  //# sourceMappingURL=Step3HowItResponds.js.map