@bikdotai/bik-component-library 0.0.841 → 0.0.842

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 (30) hide show
  1. package/dist/cjs/components/agent-builder/components/MentionPicker.js +26 -20
  2. package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
  3. package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js +2 -0
  4. package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js.map +1 -0
  5. package/dist/cjs/components/agent-builder/components/SelectableListSection.js +6 -6
  6. package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
  7. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
  8. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  9. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +1 -1
  10. package/dist/cjs/components/agent-builder/utils/mentionSerialization.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/esm/components/agent-builder/AgentBuilder.model.d.ts +31 -1
  14. package/dist/esm/components/agent-builder/components/MentionPicker.js +142 -122
  15. package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
  16. package/dist/esm/components/agent-builder/components/RequireVerificationModal.d.ts +18 -0
  17. package/dist/esm/components/agent-builder/components/RequireVerificationModal.js +74 -0
  18. package/dist/esm/components/agent-builder/components/RequireVerificationModal.js.map +1 -0
  19. package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +5 -0
  20. package/dist/esm/components/agent-builder/components/SelectableListSection.js +117 -106
  21. package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
  22. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +286 -204
  23. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  24. package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +2 -0
  25. package/dist/esm/components/agent-builder/utils/mentionSerialization.js +41 -40
  26. package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  27. package/dist/esm/icons/Informational/Common UI/Shield.d.ts +1 -2
  28. package/dist/esm/icons/Informational/Common UI/Shield.js +10 -11
  29. package/dist/esm/icons/Informational/Common UI/Shield.js.map +1 -1
  30. package/package.json +1 -1
@@ -1,334 +1,416 @@
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) => ({
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) => ({
21
24
  label: t.display_name,
22
25
  value: t.tool_id,
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 = () => {
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 = () => {
28
34
  const {
29
35
  value: t,
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,
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,
53
59
  kind: "restapi",
54
60
  initialRest: e
55
61
  });
56
- }, []), E = r(
62
+ }, []), L = s(
57
63
  (e, o) => {
58
- v.current += 1, u({
59
- key: v.current,
64
+ O.current += 1, f({
65
+ key: O.current,
60
66
  kind: "config",
61
67
  toolKey: e,
62
68
  initialConfig: o
63
69
  });
64
70
  },
65
71
  []
66
- ), le = r(
72
+ ), be = s(
67
73
  (e) => {
68
74
  const o = !(t.restApiTools ?? []).some((n) => n.id === e.id);
69
- s({ restApiTools: oe(t.restApiTools, e) }), o && a("tool", e.id, Ke(e).label), u(null);
75
+ l({ restApiTools: me(t.restApiTools, e) }), o && c("tool", e.id, Je(e).label), f(null);
70
76
  },
71
- [s, t.restApiTools, a]
72
- ), se = r(
77
+ [l, t.restApiTools, c]
78
+ ), Se = s(
73
79
  (e) => {
74
80
  const o = !(t.configTools ?? []).some((n) => n.id === e.id);
75
- s({ configTools: oe(t.configTools, e) }), o && a("tool", e.id, Le(e).label), u(null);
81
+ l({ configTools: me(t.configTools, e) }), o && c("tool", e.id, Qe(e).label), f(null);
76
82
  },
77
- [s, t.configTools, a]
78
- ), N = r(
83
+ [l, t.configTools, c]
84
+ ), K = s(
79
85
  (e) => {
80
- const o = _e[e];
81
- o ? E(o) : x();
86
+ const o = je[e];
87
+ o ? L(o) : H();
82
88
  },
83
- [E, x]
89
+ [L, H]
84
90
  );
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" });
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" });
90
96
  }, []);
91
- $(() => {
92
- if (p)
93
- return O(_), () => O(null);
94
- }, [O, _, p]);
95
- const re = r(
97
+ U(() => {
98
+ if (m)
99
+ return P(q), () => P(null);
100
+ }, [P, q, m]);
101
+ const Te = s(
96
102
  async (e) => {
97
- if (!T)
103
+ if (!I)
98
104
  return;
99
- const o = await T(e);
100
- A.current += 1, y({
101
- key: A.current,
105
+ const o = await I(e);
106
+ w.current += 1, C({
107
+ key: w.current,
102
108
  title: "Edit sub-agent",
103
109
  editingId: e,
104
110
  initial: o
105
111
  });
106
112
  },
107
- [T]
108
- ), ce = r(
113
+ [I]
114
+ ), ve = s(
109
115
  async (e) => {
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),
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),
115
121
  o
116
122
  ]);
117
123
  }
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}`);
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}`);
121
127
  }
122
- y(null);
128
+ C(null);
123
129
  },
124
130
  [
125
- d,
126
- k,
127
131
  p,
128
- s,
132
+ E,
133
+ m,
134
+ l,
129
135
  t.subagents,
130
- a
136
+ c
131
137
  ]
132
- ), de = t.tools.map((e) => {
133
- const o = b.find((n) => n.tool_id === e);
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);
134
160
  return o ? {
135
161
  id: e,
136
162
  label: o.display_name,
137
- icon: te(o.source ?? g.Manifest)
163
+ icon: fe(o.source ?? S.Manifest),
164
+ authRequired: o.auth_required
138
165
  } : null;
139
- }).filter((e) => e !== null), pe = (t.restApiTools ?? []).map(
166
+ }).filter((e) => e !== null), Ce = (t.restApiTools ?? []).map(
140
167
  (e) => ({
141
168
  id: e.id,
142
- label: Pe(e),
143
- icon: Y[g.RestApi],
144
- onConfigure: () => x(e)
169
+ label: Xe(e),
170
+ icon: re[S.RestApi],
171
+ onConfigure: () => H(e)
145
172
  })
146
- ), ue = (t.configTools ?? []).map(
173
+ ), we = (t.configTools ?? []).map(
147
174
  (e) => ({
148
175
  id: e.id,
149
- label: He(e),
150
- icon: Y[e.tool_key === "send_slack_message" ? g.Slack : g.EmailHandover],
151
- onConfigure: () => E(e.tool_key, e)
176
+ label: Ye(e),
177
+ icon: re[e.tool_key === "send_slack_message" ? S.Slack : S.EmailHandover],
178
+ onConfigure: () => L(e.tool_key, e)
152
179
  })
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 = (() => {
180
+ ), Oe = [
181
+ ...Ie,
182
+ ...Ce,
183
+ ...we
184
+ ], Re = to(
185
+ x,
186
+ K,
187
+ j,
188
+ $
189
+ ), _e = r.map(ue), ke = (() => {
163
190
  const e = [], o = /* @__PURE__ */ new Map();
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));
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));
167
194
  }), e.map((n) => ({
168
195
  source: n,
169
- label: Be(n),
196
+ label: Ze(n),
170
197
  options: o.get(n) ?? [],
171
198
  // Not connected → the source button opens the connect flow instead of
172
199
  // its tool list (see SelectableListSection / onConnectIntegration).
173
- connected: H?.[n],
174
- onConnect: () => B?.(n)
200
+ connected: j?.[n],
201
+ onConnect: () => $?.(n)
175
202
  }));
176
- })(), Se = t.subagents.map((e) => {
177
- const o = I.get(e);
203
+ })(), Me = t.subagents.map((e) => {
204
+ const o = R.get(e);
178
205
  return o ? { id: e, label: o.name } : null;
179
- }).filter((e) => e !== null), he = G.map((e) => ({
206
+ }).filter((e) => e !== null), xe = Q.map((e) => ({
180
207
  label: e.name,
181
208
  value: e.id
182
- })), U = X(P), Te = [
183
- ...Q(b, [], U),
184
- ...Fe(t.configTools, t.restApiTools)
185
- ], ye = Q(
209
+ })), X = se(V), Ee = [
210
+ ...ae(r, [], X),
211
+ ...eo(t.configTools, t.restApiTools)
212
+ ], Ne = ae(
186
213
  [],
187
- G,
188
- U
189
- ), Ae = C.map((e) => ({
214
+ Q,
215
+ X
216
+ ), Pe = M.map((e) => ({
190
217
  label: e.label,
191
218
  value: e.value,
192
219
  selected: e.value === t.model
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,
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,
200
227
  {
201
228
  fieldKey: "instructions",
202
229
  "data-test": "agent-instructions",
203
230
  label: "Instructions",
204
- maxLength: S.instructions,
231
+ maxLength: T.instructions,
205
232
  placeholder: "Write the steps in plain English. The agent will follow them exactly. The more specific you are, the better it performs.",
206
233
  minHeight: "200px"
207
234
  }
208
235
  ),
209
- /* @__PURE__ */ l(
210
- q,
236
+ /* @__PURE__ */ i(
237
+ ie,
211
238
  {
212
239
  fieldKey: "guardrail",
213
240
  "data-test": "agent-guardrail",
214
241
  label: "Guardrails",
215
- maxLength: S.guardrail,
242
+ maxLength: T.guardrail,
216
243
  placeholder: "e.g. Never discuss competitor pricing. Always stay within the cancellation policy. Do not process refunds above ₹10,000 without human approval.",
217
244
  minHeight: "140px"
218
245
  }
219
246
  )
220
247
  ] }),
221
- /* @__PURE__ */ l(ke, {}),
222
- /* @__PURE__ */ h(V, { children: [
223
- /* @__PURE__ */ l(
224
- J,
248
+ /* @__PURE__ */ i(qe, {}),
249
+ /* @__PURE__ */ d(te, { children: [
250
+ /* @__PURE__ */ i(
251
+ le,
225
252
  {
226
253
  title: "Tools",
227
254
  helper: "Actions this agent can take while responding.",
228
255
  dataTestPrefix: "agent-tools",
229
- items: me,
230
- addableOptions: fe,
231
- sourceGroups: be,
232
- mentionItems: Te,
233
- actionSources: ge,
256
+ items: Oe,
257
+ addableOptions: _e,
258
+ sourceGroups: ke,
259
+ mentionItems: Ee,
260
+ actionSources: Re,
234
261
  emptyText: "No tools added yet.",
235
- onAdd: (e) => {
236
- a("tool", e), c("tool", e);
237
- },
238
- onRemove: (e) => L("tool", e),
262
+ onAdd: Ae,
263
+ onRemove: (e) => z("tool", e),
239
264
  confirmDelete: { noun: "tool" }
240
265
  }
241
266
  ),
242
- /* @__PURE__ */ l(
243
- J,
267
+ /* @__PURE__ */ i(
268
+ le,
244
269
  {
245
270
  title: "Sub-agents",
246
271
  helper: "Other agents this agent can hand off the conversation to.",
247
272
  dataTestPrefix: "agent-subagents",
248
- items: Se,
249
- addableOptions: he,
250
- mentionItems: ye,
273
+ items: Me,
274
+ addableOptions: xe,
275
+ mentionItems: Ne,
251
276
  emptyText: "No sub-agents added yet.",
252
277
  onAdd: (e) => {
253
- a("subagent", e), c("subagent", e);
278
+ c("subagent", e), u("subagent", e);
254
279
  },
255
- onRemove: (e) => L("subagent", e),
280
+ onRemove: (e) => z("subagent", e),
256
281
  confirmDelete: { noun: "sub-agent" },
257
- onConfigure: T ? re : void 0,
258
- createOption: p ? { label: "Create new", onSelect: _ } : void 0
282
+ onConfigure: I ? Te : void 0,
283
+ createOption: m ? { label: "Create new", onSelect: q } : void 0
259
284
  }
260
285
  ),
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,
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,
266
337
  {
267
338
  "data-test": "agent-model",
268
339
  size: "small",
269
340
  width: "100%",
270
341
  dropdownWidth: "328px",
271
342
  placeHolder: "Select model",
272
- options: Ae,
273
- defaultOptions: D ? [
343
+ options: Pe,
344
+ defaultOptions: G ? [
274
345
  {
275
- label: D.label,
276
- value: D.value
346
+ label: G.label,
347
+ value: G.value
277
348
  }
278
349
  ] : void 0,
279
350
  onSelect: (e) => {
280
- const o = je(e);
281
- o && f("model", o);
351
+ const o = de(e);
352
+ o && y("model", o);
282
353
  }
283
354
  }
284
355
  )
285
356
  ] })
286
357
  ] })
287
358
  ] }),
288
- d && /* @__PURE__ */ l(
289
- Me,
359
+ p && /* @__PURE__ */ i(
360
+ Ge,
290
361
  {
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
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
301
372
  },
302
- d.key
373
+ p.key
303
374
  ),
304
- i?.kind === "restapi" && /* @__PURE__ */ l(
305
- xe,
375
+ a?.kind === "restapi" && /* @__PURE__ */ i(
376
+ We,
306
377
  {
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
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
313
384
  },
314
- i.key
385
+ a.key
315
386
  ),
316
- i?.kind === "config" && i.toolKey && W && /* @__PURE__ */ l(
317
- Oe,
387
+ a?.kind === "config" && a.toolKey && Y && /* @__PURE__ */ i(
388
+ Fe,
318
389
  {
319
- toolKey: i.toolKey,
320
- template: W,
321
- initial: i.initialConfig,
322
- charLimits: S,
323
- onImprove: R,
324
- onClose: () => u(null),
325
- onSave: se
390
+ toolKey: a.toolKey,
391
+ template: Y,
392
+ initial: a.initialConfig,
393
+ charLimits: T,
394
+ onImprove: N,
395
+ onClose: () => f(null),
396
+ onSave: Se
326
397
  },
327
- i.key
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
+ }
328
410
  )
329
411
  ] });
330
412
  };
331
413
  export {
332
- uo as Step3HowItResponds
414
+ ko as Step3HowItResponds
333
415
  };
334
416
  //# sourceMappingURL=Step3HowItResponds.js.map