@bikdotai/bik-component-library 0.0.841-beta.1 → 0.0.841

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