@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.
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionPicker.js +20 -26
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +6 -6
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +1 -1
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentListing.js.map +1 -1
- package/dist/cjs/icons/Informational/Common UI/Shield.js +1 -1
- package/dist/cjs/icons/Informational/Common UI/Shield.js.map +1 -1
- package/dist/cjs/icons/Media/Visual/FormkitNeutral.js +2 -0
- package/dist/cjs/icons/Media/Visual/FormkitNeutral.js.map +1 -0
- package/dist/cjs/icons/Media/Visual/FormkitSad.js +2 -0
- package/dist/cjs/icons/Media/Visual/FormkitSad.js.map +1 -0
- package/dist/cjs/icons/index.js +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +1 -31
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.js +154 -175
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +0 -5
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +106 -117
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +204 -286
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +0 -2
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js +40 -41
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentListing.js +1 -6
- package/dist/esm/components/agent-listing/AgentListing.js.map +1 -1
- package/dist/esm/icons/Informational/Common UI/Shield.d.ts +2 -1
- package/dist/esm/icons/Informational/Common UI/Shield.js +11 -10
- package/dist/esm/icons/Informational/Common UI/Shield.js.map +1 -1
- package/dist/esm/icons/Media/Visual/FormkitNeutral.js +58 -0
- package/dist/esm/icons/Media/Visual/FormkitNeutral.js.map +1 -0
- package/dist/esm/icons/Media/Visual/FormkitSad.js +61 -0
- package/dist/esm/icons/Media/Visual/FormkitSad.js.map +1 -0
- package/dist/esm/icons/Media/Visual/index.d.ts +2 -0
- package/dist/esm/icons/index.d.ts +25 -25
- package/dist/esm/icons/index.js +422 -418
- package/dist/esm/icons/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js +0 -2
- package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js.map +0 -1
- package/dist/esm/components/agent-builder/components/RequireVerificationModal.d.ts +0 -18
- package/dist/esm/components/agent-builder/components/RequireVerificationModal.js +0 -74
- package/dist/esm/components/agent-builder/components/RequireVerificationModal.js.map +0 -1
|
@@ -1,416 +1,334 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { TitleSmall as
|
|
4
|
-
import { COLORS as
|
|
5
|
-
import { Step3Root as
|
|
6
|
-
import { ConfigToolPanel as
|
|
7
|
-
import { CreateSubAgentPanel as
|
|
8
|
-
import { MentionField as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
|
|
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:
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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:
|
|
37
|
-
updateField:
|
|
38
|
-
addReference:
|
|
39
|
-
removeReference:
|
|
40
|
-
availableTools:
|
|
41
|
-
availableSubAgents:
|
|
42
|
-
availableModels:
|
|
43
|
-
configToolTemplates:
|
|
44
|
-
applicationType:
|
|
45
|
-
charLimits:
|
|
46
|
-
insertMention:
|
|
47
|
-
onCreateSubAgent:
|
|
48
|
-
onFetchSubAgent:
|
|
49
|
-
onUpdateSubAgent:
|
|
50
|
-
onImproveSubAgent:
|
|
51
|
-
onImproveToolInstructions:
|
|
52
|
-
registerSubAgentCreator:
|
|
53
|
-
registerToolActionHandler:
|
|
54
|
-
integrationStatus:
|
|
55
|
-
onConnectIntegration:
|
|
56
|
-
} =
|
|
57
|
-
|
|
58
|
-
key:
|
|
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
|
-
}, []),
|
|
56
|
+
}, []), E = r(
|
|
63
57
|
(e, o) => {
|
|
64
|
-
|
|
65
|
-
key:
|
|
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
|
-
),
|
|
66
|
+
), le = r(
|
|
73
67
|
(e) => {
|
|
74
68
|
const o = !(t.restApiTools ?? []).some((n) => n.id === e.id);
|
|
75
|
-
|
|
69
|
+
s({ restApiTools: oe(t.restApiTools, e) }), o && a("tool", e.id, Ke(e).label), u(null);
|
|
76
70
|
},
|
|
77
|
-
[
|
|
78
|
-
),
|
|
71
|
+
[s, t.restApiTools, a]
|
|
72
|
+
), se = r(
|
|
79
73
|
(e) => {
|
|
80
74
|
const o = !(t.configTools ?? []).some((n) => n.id === e.id);
|
|
81
|
-
|
|
75
|
+
s({ configTools: oe(t.configTools, e) }), o && a("tool", e.id, Le(e).label), u(null);
|
|
82
76
|
},
|
|
83
|
-
[
|
|
84
|
-
),
|
|
77
|
+
[s, t.configTools, a]
|
|
78
|
+
), N = r(
|
|
85
79
|
(e) => {
|
|
86
|
-
const o =
|
|
87
|
-
o ?
|
|
80
|
+
const o = _e[e];
|
|
81
|
+
o ? E(o) : x();
|
|
88
82
|
},
|
|
89
|
-
[
|
|
83
|
+
[E, x]
|
|
90
84
|
);
|
|
91
|
-
|
|
92
|
-
const [
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
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
|
-
|
|
98
|
-
if (
|
|
99
|
-
return
|
|
100
|
-
}, [
|
|
101
|
-
const
|
|
91
|
+
$(() => {
|
|
92
|
+
if (p)
|
|
93
|
+
return O(_), () => O(null);
|
|
94
|
+
}, [O, _, p]);
|
|
95
|
+
const re = r(
|
|
102
96
|
async (e) => {
|
|
103
|
-
if (!
|
|
97
|
+
if (!T)
|
|
104
98
|
return;
|
|
105
|
-
const o = await
|
|
106
|
-
|
|
107
|
-
key:
|
|
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
|
-
[
|
|
114
|
-
),
|
|
107
|
+
[T]
|
|
108
|
+
), ce = r(
|
|
115
109
|
async (e) => {
|
|
116
|
-
if (
|
|
117
|
-
if (
|
|
118
|
-
const o = await
|
|
119
|
-
|
|
120
|
-
...n.filter((
|
|
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 (
|
|
125
|
-
const o = await
|
|
126
|
-
|
|
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
|
-
|
|
122
|
+
y(null);
|
|
129
123
|
},
|
|
130
124
|
[
|
|
125
|
+
d,
|
|
126
|
+
k,
|
|
131
127
|
p,
|
|
132
|
-
|
|
133
|
-
m,
|
|
134
|
-
l,
|
|
128
|
+
s,
|
|
135
129
|
t.subagents,
|
|
136
|
-
|
|
130
|
+
a
|
|
137
131
|
]
|
|
138
|
-
),
|
|
139
|
-
|
|
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:
|
|
164
|
-
authRequired: o.auth_required
|
|
137
|
+
icon: te(o.source ?? g.Manifest)
|
|
165
138
|
} : null;
|
|
166
|
-
}).filter((e) => e !== null),
|
|
139
|
+
}).filter((e) => e !== null), pe = (t.restApiTools ?? []).map(
|
|
167
140
|
(e) => ({
|
|
168
141
|
id: e.id,
|
|
169
|
-
label:
|
|
170
|
-
icon:
|
|
171
|
-
onConfigure: () =>
|
|
142
|
+
label: Pe(e),
|
|
143
|
+
icon: Y[g.RestApi],
|
|
144
|
+
onConfigure: () => x(e)
|
|
172
145
|
})
|
|
173
|
-
),
|
|
146
|
+
), ue = (t.configTools ?? []).map(
|
|
174
147
|
(e) => ({
|
|
175
148
|
id: e.id,
|
|
176
|
-
label:
|
|
177
|
-
icon:
|
|
178
|
-
onConfigure: () =>
|
|
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
|
-
),
|
|
181
|
-
...
|
|
182
|
-
...
|
|
183
|
-
...
|
|
184
|
-
],
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
),
|
|
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
|
|
192
|
-
const
|
|
193
|
-
o.has(
|
|
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:
|
|
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:
|
|
201
|
-
onConnect: () =>
|
|
173
|
+
connected: H?.[n],
|
|
174
|
+
onConnect: () => B?.(n)
|
|
202
175
|
}));
|
|
203
|
-
})(),
|
|
204
|
-
const o =
|
|
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),
|
|
179
|
+
}).filter((e) => e !== null), he = G.map((e) => ({
|
|
207
180
|
label: e.name,
|
|
208
181
|
value: e.id
|
|
209
|
-
})),
|
|
210
|
-
...
|
|
211
|
-
...
|
|
212
|
-
],
|
|
182
|
+
})), U = X(P), Te = [
|
|
183
|
+
...Q(b, [], U),
|
|
184
|
+
...Fe(t.configTools, t.restApiTools)
|
|
185
|
+
], ye = Q(
|
|
213
186
|
[],
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
),
|
|
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
|
-
})),
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
|
|
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:
|
|
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__ */
|
|
237
|
-
|
|
209
|
+
/* @__PURE__ */ l(
|
|
210
|
+
q,
|
|
238
211
|
{
|
|
239
212
|
fieldKey: "guardrail",
|
|
240
213
|
"data-test": "agent-guardrail",
|
|
241
214
|
label: "Guardrails",
|
|
242
|
-
maxLength:
|
|
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__ */
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
|
|
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:
|
|
257
|
-
addableOptions:
|
|
258
|
-
sourceGroups:
|
|
259
|
-
mentionItems:
|
|
260
|
-
actionSources:
|
|
229
|
+
items: me,
|
|
230
|
+
addableOptions: fe,
|
|
231
|
+
sourceGroups: be,
|
|
232
|
+
mentionItems: Te,
|
|
233
|
+
actionSources: ge,
|
|
261
234
|
emptyText: "No tools added yet.",
|
|
262
|
-
onAdd:
|
|
263
|
-
|
|
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__ */
|
|
268
|
-
|
|
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:
|
|
274
|
-
addableOptions:
|
|
275
|
-
mentionItems:
|
|
248
|
+
items: Se,
|
|
249
|
+
addableOptions: he,
|
|
250
|
+
mentionItems: ye,
|
|
276
251
|
emptyText: "No sub-agents added yet.",
|
|
277
252
|
onAdd: (e) => {
|
|
278
|
-
|
|
253
|
+
a("subagent", e), c("subagent", e);
|
|
279
254
|
},
|
|
280
|
-
onRemove: (e) =>
|
|
255
|
+
onRemove: (e) => L("subagent", e),
|
|
281
256
|
confirmDelete: { noun: "sub-agent" },
|
|
282
|
-
onConfigure:
|
|
283
|
-
createOption:
|
|
257
|
+
onConfigure: T ? re : void 0,
|
|
258
|
+
createOption: p ? { label: "Create new", onSelect: _ } : void 0
|
|
284
259
|
}
|
|
285
260
|
),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
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:
|
|
344
|
-
defaultOptions:
|
|
272
|
+
options: Ae,
|
|
273
|
+
defaultOptions: D ? [
|
|
345
274
|
{
|
|
346
|
-
label:
|
|
347
|
-
value:
|
|
275
|
+
label: D.label,
|
|
276
|
+
value: D.value
|
|
348
277
|
}
|
|
349
278
|
] : void 0,
|
|
350
279
|
onSelect: (e) => {
|
|
351
|
-
const o =
|
|
352
|
-
o &&
|
|
280
|
+
const o = je(e);
|
|
281
|
+
o && f("model", o);
|
|
353
282
|
}
|
|
354
283
|
}
|
|
355
284
|
)
|
|
356
285
|
] })
|
|
357
286
|
] })
|
|
358
287
|
] }),
|
|
359
|
-
|
|
360
|
-
|
|
288
|
+
d && /* @__PURE__ */ l(
|
|
289
|
+
Me,
|
|
361
290
|
{
|
|
362
|
-
title:
|
|
363
|
-
initial:
|
|
364
|
-
availableTools:
|
|
365
|
-
configToolTemplates:
|
|
366
|
-
appLabel:
|
|
367
|
-
charLimits:
|
|
368
|
-
onImprove:
|
|
369
|
-
onImproveToolInstructions:
|
|
370
|
-
onClose: () =>
|
|
371
|
-
onSave:
|
|
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
|
-
|
|
302
|
+
d.key
|
|
374
303
|
),
|
|
375
|
-
|
|
376
|
-
|
|
304
|
+
i?.kind === "restapi" && /* @__PURE__ */ l(
|
|
305
|
+
xe,
|
|
377
306
|
{
|
|
378
|
-
initial:
|
|
379
|
-
charLimits:
|
|
380
|
-
existingNames: (t.restApiTools ?? []).filter((e) => e.id !==
|
|
381
|
-
onImprove:
|
|
382
|
-
onClose: () =>
|
|
383
|
-
onSave:
|
|
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
|
-
|
|
314
|
+
i.key
|
|
386
315
|
),
|
|
387
|
-
|
|
388
|
-
|
|
316
|
+
i?.kind === "config" && i.toolKey && W && /* @__PURE__ */ l(
|
|
317
|
+
Oe,
|
|
389
318
|
{
|
|
390
|
-
toolKey:
|
|
391
|
-
template:
|
|
392
|
-
initial:
|
|
393
|
-
charLimits:
|
|
394
|
-
onImprove:
|
|
395
|
-
onClose: () =>
|
|
396
|
-
onSave:
|
|
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
|
-
|
|
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
|
-
|
|
332
|
+
uo as Step3HowItResponds
|
|
415
333
|
};
|
|
416
334
|
//# sourceMappingURL=Step3HowItResponds.js.map
|