@bikdotai/bik-component-library 0.0.853 → 0.0.855

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