@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.
- 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/components/AgentBuilderFooter.js +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +5 -5
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js +1 -1
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionPicker.js +24 -24
- 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/RestApiToolPanel.js +2 -2
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.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/steps/Step3HowItResponds.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/cjs/components/agent-builder/utils/sourceIcons.js +1 -1
- package/dist/cjs/components/agent-builder/utils/sourceIcons.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/components/agent-listing/AiAgentsEmptyState.js +1 -1
- package/dist/cjs/components/agent-listing/AiAgentsEmptyState.js.map +1 -1
- package/dist/cjs/components/zeroState/ZeroState.js +3 -3
- package/dist/cjs/components/zeroState/ZeroState.js.map +1 -1
- package/dist/cjs/editor/BikEditor.js +1 -1
- package/dist/cjs/editor/BikEditor.js.map +1 -1
- package/dist/cjs/editor/BikEditor.styles.js +22 -16
- package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
- package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js +3 -3
- package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.js +146 -136
- package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +7 -2
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.d.ts +2 -0
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js +29 -26
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js +30 -29
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.d.ts +9 -0
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +199 -184
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/GoLiveModal.js +11 -13
- package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.js +174 -150
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/RequireVerificationModal.js +8 -8
- package/dist/esm/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js +54 -51
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +73 -69
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/constants/tools.d.ts +20 -0
- package/dist/esm/components/agent-builder/constants/tools.js +34 -23
- package/dist/esm/components/agent-builder/constants/tools.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +270 -255
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/sourceIcons.d.ts +6 -6
- package/dist/esm/components/agent-builder/utils/sourceIcons.js +21 -19
- package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentTableRow.js +26 -23
- package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/esm/components/agent-listing/AiAgentsEmptyState.js +3 -2
- package/dist/esm/components/agent-listing/AiAgentsEmptyState.js.map +1 -1
- package/dist/esm/components/zeroState/ZeroState.d.ts +2 -0
- package/dist/esm/components/zeroState/ZeroState.js +18 -17
- package/dist/esm/components/zeroState/ZeroState.js.map +1 -1
- package/dist/esm/editor/BikEditor.js +236 -223
- package/dist/esm/editor/BikEditor.js.map +1 -1
- package/dist/esm/editor/BikEditor.styles.js +18 -12
- package/dist/esm/editor/BikEditor.styles.js.map +1 -1
- package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js +62 -60
- package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,261 +1,274 @@
|
|
|
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 { RequireVerificationModal as
|
|
10
|
-
import { RestApiToolPanel as
|
|
11
|
-
import { SelectableListSection as
|
|
12
|
-
import { StepSectionHeader as
|
|
13
|
-
import { STEP_DEFINITIONS as
|
|
14
|
-
import { ToolSource as
|
|
15
|
-
import { useAgentBuilderContext as
|
|
16
|
-
import { restApiMentionItem as
|
|
17
|
-
import { sourceIcon as
|
|
18
|
-
import { buildToolActions as
|
|
19
|
-
import
|
|
20
|
-
import { Dropdown as
|
|
21
|
-
import { unwrapDropdownValue as
|
|
22
|
-
import { Tooltip as
|
|
23
|
-
import { Switch as
|
|
24
|
-
const
|
|
25
|
-
label:
|
|
26
|
-
value:
|
|
27
|
-
leadingIcon:
|
|
28
|
-
}),
|
|
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
|
-
],
|
|
32
|
-
const
|
|
33
|
-
return
|
|
34
|
-
},
|
|
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:
|
|
36
|
+
value: n,
|
|
37
37
|
patch: l,
|
|
38
|
-
updateField:
|
|
39
|
-
addReference:
|
|
40
|
-
removeReference:
|
|
41
|
-
availableTools:
|
|
42
|
-
availableSubAgents:
|
|
43
|
-
availableModels:
|
|
44
|
-
configToolTemplates:
|
|
45
|
-
applicationType:
|
|
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:
|
|
48
|
-
onCreateSubAgent:
|
|
49
|
-
onFetchSubAgent:
|
|
50
|
-
onUpdateSubAgent:
|
|
51
|
-
onImproveSubAgent:
|
|
52
|
-
onImproveToolInstructions:
|
|
53
|
-
registerSubAgentCreator:
|
|
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:
|
|
56
|
-
onConnectIntegration:
|
|
57
|
-
} =
|
|
58
|
-
|
|
59
|
-
key:
|
|
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
|
-
}, []),
|
|
64
|
-
(e,
|
|
65
|
-
|
|
66
|
-
key:
|
|
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:
|
|
69
|
+
initialConfig: t
|
|
70
70
|
});
|
|
71
71
|
},
|
|
72
72
|
[]
|
|
73
|
-
), ye =
|
|
73
|
+
), ye = c(
|
|
74
74
|
(e) => {
|
|
75
|
-
const
|
|
76
|
-
l({ restApiTools:
|
|
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
|
-
|
|
80
|
-
|
|
81
|
-
),
|
|
79
|
+
nt(e).label,
|
|
80
|
+
p.RestApi
|
|
81
|
+
), b(null);
|
|
82
82
|
},
|
|
83
|
-
[l,
|
|
84
|
-
),
|
|
83
|
+
[l, n.restApiTools, d]
|
|
84
|
+
), ve = c(
|
|
85
85
|
(e) => {
|
|
86
|
-
const
|
|
87
|
-
if (l({ configTools:
|
|
88
|
-
const
|
|
89
|
-
|
|
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
|
-
|
|
93
|
-
|
|
92
|
+
it(e).label,
|
|
93
|
+
o
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
b(null);
|
|
97
97
|
},
|
|
98
|
-
[l,
|
|
99
|
-
),
|
|
98
|
+
[l, n.configTools, d]
|
|
99
|
+
), G = c(
|
|
100
100
|
(e) => {
|
|
101
|
-
const
|
|
102
|
-
|
|
101
|
+
const t = tt[e];
|
|
102
|
+
t ? F(t) : B();
|
|
103
103
|
},
|
|
104
|
-
[
|
|
104
|
+
[F, B]
|
|
105
105
|
);
|
|
106
|
-
|
|
107
|
-
const [
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
|
|
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
|
-
|
|
113
|
-
if (
|
|
114
|
-
return
|
|
115
|
-
}, [
|
|
116
|
-
const
|
|
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 (!
|
|
118
|
+
if (!_)
|
|
119
119
|
return;
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
key:
|
|
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:
|
|
125
|
+
initial: t
|
|
126
126
|
});
|
|
127
127
|
},
|
|
128
|
-
[
|
|
129
|
-
),
|
|
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
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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 (
|
|
140
|
-
const o = await
|
|
141
|
-
|
|
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
|
-
|
|
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
|
-
|
|
151
|
-
|
|
164
|
+
n.subagents,
|
|
165
|
+
d,
|
|
166
|
+
s
|
|
152
167
|
]
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
174
|
+
d("tool", e), m("tool", e);
|
|
162
175
|
},
|
|
163
|
-
[
|
|
164
|
-
),
|
|
176
|
+
[d, m]
|
|
177
|
+
), ke = c(
|
|
165
178
|
(e) => {
|
|
166
|
-
if (
|
|
167
|
-
|
|
179
|
+
if (s.find((o) => o.tool_id === e)?.auth_required && !S) {
|
|
180
|
+
W(e);
|
|
168
181
|
return;
|
|
169
182
|
}
|
|
170
|
-
|
|
183
|
+
z(e);
|
|
171
184
|
},
|
|
172
|
-
[
|
|
173
|
-
),
|
|
174
|
-
const
|
|
175
|
-
return
|
|
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:
|
|
178
|
-
icon:
|
|
179
|
-
authRequired:
|
|
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),
|
|
194
|
+
}).filter((e) => e !== null), Me = (n.restApiTools ?? []).map(
|
|
182
195
|
(e) => ({
|
|
183
196
|
id: e.id,
|
|
184
|
-
label:
|
|
185
|
-
icon:
|
|
186
|
-
onConfigure: () =>
|
|
197
|
+
label: lt(e),
|
|
198
|
+
icon: ue[p.RestApi],
|
|
199
|
+
onConfigure: () => B(e)
|
|
187
200
|
})
|
|
188
|
-
),
|
|
201
|
+
), Ee = (n.configTools ?? []).map(
|
|
189
202
|
(e) => ({
|
|
190
203
|
id: e.id,
|
|
191
|
-
label:
|
|
192
|
-
icon:
|
|
193
|
-
onConfigure: () =>
|
|
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
|
-
),
|
|
196
|
-
...
|
|
197
|
-
...
|
|
198
|
-
...
|
|
199
|
-
],
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
),
|
|
205
|
-
const e = [],
|
|
206
|
-
return
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
}), e.map((
|
|
210
|
-
source:
|
|
211
|
-
label:
|
|
212
|
-
options:
|
|
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:
|
|
216
|
-
onConnect: () =>
|
|
228
|
+
connected: L?.[o],
|
|
229
|
+
onConnect: () => K?.(o)
|
|
217
230
|
}));
|
|
218
|
-
})(),
|
|
219
|
-
const
|
|
220
|
-
return
|
|
221
|
-
}).filter((e) => e !== null),
|
|
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
|
-
})),
|
|
225
|
-
...
|
|
226
|
-
...
|
|
227
|
-
],
|
|
237
|
+
})), Z = de(Q), Ke = [
|
|
238
|
+
...ce(s, [], Z),
|
|
239
|
+
...rt(n.configTools, n.restApiTools)
|
|
240
|
+
], Be = ce(
|
|
228
241
|
[],
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
),
|
|
242
|
+
Y,
|
|
243
|
+
Z
|
|
244
|
+
), Fe = E.map((e) => ({
|
|
232
245
|
label: e.label,
|
|
233
246
|
value: e.value,
|
|
234
|
-
selected: e.value ===
|
|
235
|
-
})),
|
|
236
|
-
|
|
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:
|
|
252
|
+
value: S || f,
|
|
240
253
|
disabled: f,
|
|
241
254
|
onValueChange: async (e) => {
|
|
242
|
-
l({ authentication: { enabled: e, type:
|
|
255
|
+
l({ authentication: { enabled: e, type: T } });
|
|
243
256
|
}
|
|
244
257
|
}
|
|
245
|
-
),
|
|
246
|
-
|
|
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:
|
|
263
|
+
children: /* @__PURE__ */ i("span", { style: { display: "flex" }, children: te })
|
|
251
264
|
}
|
|
252
|
-
) :
|
|
253
|
-
return /* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */ i(
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
281
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ i(je, {}),
|
|
294
|
+
/* @__PURE__ */ u(le, { children: [
|
|
282
295
|
/* @__PURE__ */ i(
|
|
283
|
-
|
|
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:
|
|
289
|
-
addableOptions:
|
|
290
|
-
sourceGroups:
|
|
291
|
-
mentionItems:
|
|
292
|
-
actionSources:
|
|
301
|
+
items: Ne,
|
|
302
|
+
addableOptions: Pe,
|
|
303
|
+
sourceGroups: De,
|
|
304
|
+
mentionItems: Ke,
|
|
305
|
+
actionSources: qe,
|
|
293
306
|
emptyText: "No tools added yet.",
|
|
294
|
-
onAdd:
|
|
295
|
-
onRemove: (e) =>
|
|
307
|
+
onAdd: ke,
|
|
308
|
+
onRemove: (e) => J("tool", e),
|
|
296
309
|
confirmDelete: { noun: "tool" }
|
|
297
310
|
}
|
|
298
311
|
),
|
|
299
312
|
/* @__PURE__ */ i(
|
|
300
|
-
|
|
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:
|
|
306
|
-
addableOptions:
|
|
307
|
-
mentionItems:
|
|
318
|
+
items: He,
|
|
319
|
+
addableOptions: Le,
|
|
320
|
+
mentionItems: Be,
|
|
308
321
|
emptyText: "No sub-agents added yet.",
|
|
309
322
|
onAdd: (e) => {
|
|
310
|
-
|
|
323
|
+
d("subagent", e), m("subagent", e);
|
|
311
324
|
},
|
|
312
|
-
onRemove: (e) =>
|
|
325
|
+
onRemove: (e) => J("subagent", e),
|
|
313
326
|
confirmDelete: { noun: "sub-agent" },
|
|
314
|
-
onConfigure:
|
|
315
|
-
createOption:
|
|
327
|
+
onConfigure: _ ? we : void 0,
|
|
328
|
+
createOption: h ? { label: "Create new", onSelect: U } : void 0
|
|
316
329
|
}
|
|
317
330
|
),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
/* @__PURE__ */ i(
|
|
322
|
-
/* @__PURE__ */ i(
|
|
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
|
-
|
|
337
|
+
Ge
|
|
325
338
|
] }),
|
|
326
|
-
/* @__PURE__ */ i(
|
|
327
|
-
(
|
|
328
|
-
/* @__PURE__ */ i(
|
|
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
|
-
|
|
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:
|
|
350
|
+
options: $.map((e) => ({
|
|
338
351
|
...e,
|
|
339
|
-
selected: e.value ===
|
|
352
|
+
selected: e.value === T
|
|
340
353
|
})),
|
|
341
354
|
defaultOptions: [
|
|
342
|
-
|
|
355
|
+
$.find((e) => e.value === T) ?? $[0]
|
|
343
356
|
],
|
|
344
357
|
onSelect: (e) => {
|
|
345
|
-
const
|
|
346
|
-
|
|
358
|
+
const t = me(e);
|
|
359
|
+
t && l({
|
|
347
360
|
authentication: {
|
|
348
361
|
enabled: !0,
|
|
349
|
-
type:
|
|
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
|
-
|
|
358
|
-
/* @__PURE__ */ i(
|
|
359
|
-
/* @__PURE__ */ i(
|
|
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
|
-
|
|
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:
|
|
369
|
-
defaultOptions:
|
|
381
|
+
options: Fe,
|
|
382
|
+
defaultOptions: V ? [
|
|
370
383
|
{
|
|
371
|
-
label:
|
|
372
|
-
value:
|
|
384
|
+
label: V.label,
|
|
385
|
+
value: V.value
|
|
373
386
|
}
|
|
374
387
|
] : void 0,
|
|
375
388
|
onSelect: (e) => {
|
|
376
|
-
const
|
|
377
|
-
|
|
389
|
+
const t = me(e);
|
|
390
|
+
t && y("model", t);
|
|
378
391
|
}
|
|
379
392
|
}
|
|
380
393
|
)
|
|
381
394
|
] })
|
|
382
395
|
] })
|
|
383
396
|
] }),
|
|
384
|
-
|
|
385
|
-
|
|
397
|
+
g && /* @__PURE__ */ i(
|
|
398
|
+
Qe,
|
|
386
399
|
{
|
|
387
|
-
title:
|
|
388
|
-
initial:
|
|
389
|
-
existingNames:
|
|
390
|
-
availableTools:
|
|
391
|
-
configToolTemplates:
|
|
392
|
-
|
|
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:
|
|
395
|
-
onImproveToolInstructions:
|
|
396
|
-
onClose: () =>
|
|
397
|
-
onSave:
|
|
409
|
+
onImprove: Te,
|
|
410
|
+
onImproveToolInstructions: P,
|
|
411
|
+
onClose: () => O(null),
|
|
412
|
+
onSave: Oe
|
|
398
413
|
},
|
|
399
|
-
|
|
414
|
+
g.key
|
|
400
415
|
),
|
|
401
416
|
a?.kind === "restapi" && /* @__PURE__ */ i(
|
|
402
|
-
|
|
417
|
+
Ye,
|
|
403
418
|
{
|
|
404
419
|
initial: a.initialRest,
|
|
405
420
|
charLimits: v,
|
|
406
|
-
existingNames: (
|
|
407
|
-
onImprove:
|
|
408
|
-
onClose: () =>
|
|
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 &&
|
|
414
|
-
|
|
428
|
+
a?.kind === "config" && a.toolKey && ee && /* @__PURE__ */ i(
|
|
429
|
+
Je,
|
|
415
430
|
{
|
|
416
431
|
toolKey: a.toolKey,
|
|
417
|
-
template:
|
|
432
|
+
template: ee,
|
|
418
433
|
initial: a.initialConfig,
|
|
419
434
|
charLimits: v,
|
|
420
|
-
onImprove:
|
|
421
|
-
onClose: () =>
|
|
422
|
-
onSave:
|
|
435
|
+
onImprove: P,
|
|
436
|
+
onClose: () => b(null),
|
|
437
|
+
onSave: ve
|
|
423
438
|
},
|
|
424
439
|
a.key
|
|
425
440
|
),
|
|
426
441
|
/* @__PURE__ */ i(
|
|
427
|
-
|
|
442
|
+
Xe,
|
|
428
443
|
{
|
|
429
|
-
open:
|
|
430
|
-
toolLabel:
|
|
431
|
-
onCancel: () =>
|
|
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:
|
|
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
|
-
|
|
455
|
+
Lt as Step3HowItResponds
|
|
441
456
|
};
|
|
442
457
|
//# sourceMappingURL=Step3HowItResponds.js.map
|