@bikdotai/bik-component-library 0.0.852 → 0.0.853-beta.0

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