@bikdotai/bik-component-library 0.0.852 → 0.0.853

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