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