@bikdotai/bik-component-library 0.0.865-beta.4 → 0.0.865-beta.6
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 +29 -151
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.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/MentionEditor.js +2 -2
- 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 +13 -13
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +3 -3
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/cjs/components/agent-builder/constants/steps.js +1 -1
- package/dist/cjs/components/agent-builder/constants/steps.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/Step1About.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step1About.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js +2 -2
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.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/steps/Step4HandoverRules.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.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/button/Button.js +1 -1
- package/dist/cjs/components/button/Button.js.map +1 -1
- package/dist/cjs/components/button/Button.styled.js +2 -2
- package/dist/cjs/components/button/Button.styled.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/Tag.js.map +1 -1
- package/dist/cjs/components/tag/Tag.styled.js +4 -4
- package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
- package/dist/cjs/components/tag/model.js.map +1 -1
- package/dist/cjs/icons/BIK AI specific/WandSparkles.js +1 -1
- package/dist/cjs/icons/BIK AI specific/WandSparkles.js.map +1 -1
- package/dist/cjs/icons/Informational/General/MessageSource.js +2 -0
- package/dist/cjs/icons/Informational/General/MessageSource.js.map +1 -0
- package/dist/cjs/icons/index.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.js +97 -103
- package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +0 -76
- package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +0 -68
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js +59 -224
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +132 -135
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionEditor.d.ts +0 -2
- package/dist/esm/components/agent-builder/components/MentionEditor.js +45 -47
- package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionField.js +51 -52
- package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +0 -5
- package/dist/esm/components/agent-builder/components/MentionPicker.js +132 -134
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +0 -2
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +46 -48
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/constants/steps.d.ts +1 -31
- package/dist/esm/components/agent-builder/constants/steps.js +6 -15
- package/dist/esm/components/agent-builder/constants/steps.js.map +1 -1
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +1 -13
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +148 -157
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/esm/components/agent-builder/index.d.ts +2 -5
- package/dist/esm/components/agent-builder/steps/Step1About.js +13 -15
- package/dist/esm/components/agent-builder/steps/Step1About.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js +48 -55
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +157 -158
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.d.ts +0 -11
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js +23 -127
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +2 -7
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js +2 -2
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/esm/components/button/Button.js +21 -19
- package/dist/esm/components/button/Button.js.map +1 -1
- package/dist/esm/components/button/Button.styled.d.ts +1 -0
- package/dist/esm/components/button/Button.styled.js +5 -5
- package/dist/esm/components/button/Button.styled.js.map +1 -1
- package/dist/esm/components/button/model.d.ts +5 -0
- package/dist/esm/components/dropdown-button/DropdownButton.d.ts +5 -0
- package/dist/esm/components/dropdown-button/DropdownButton.js +4 -3
- package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/esm/components/tag/Tag.d.ts +1 -1
- package/dist/esm/components/tag/Tag.js +48 -41
- package/dist/esm/components/tag/Tag.js.map +1 -1
- package/dist/esm/components/tag/Tag.styled.d.ts +3 -0
- package/dist/esm/components/tag/Tag.styled.js +6 -9
- package/dist/esm/components/tag/Tag.styled.js.map +1 -1
- package/dist/esm/components/tag/model.d.ts +11 -0
- package/dist/esm/components/tag/model.js.map +1 -1
- package/dist/esm/icons/BIK AI specific/WandSparkles.js +1 -1
- package/dist/esm/icons/BIK AI specific/WandSparkles.js.map +1 -1
- package/dist/esm/icons/Informational/General/MessageSource.d.ts +7 -0
- package/dist/esm/icons/Informational/General/MessageSource.js +46 -0
- package/dist/esm/icons/Informational/General/MessageSource.js.map +1 -0
- package/dist/esm/icons/Informational/General/index.d.ts +1 -0
- package/dist/esm/icons/index.d.ts +25 -25
- package/dist/esm/icons/index.js +294 -292
- package/dist/esm/icons/index.js.map +1 -1
- package/dist/esm/index.js +636 -644
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js +0 -2
- package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/ChannelsSection.js +0 -2
- package/dist/cjs/components/agent-builder/components/ChannelsSection.js.map +0 -1
- package/dist/cjs/components/agent-builder/constants/channels.js +0 -2
- package/dist/cjs/components/agent-builder/constants/channels.js.map +0 -1
- package/dist/esm/components/agent-builder/components/ChannelSelectModal.d.ts +0 -26
- package/dist/esm/components/agent-builder/components/ChannelSelectModal.js +0 -121
- package/dist/esm/components/agent-builder/components/ChannelSelectModal.js.map +0 -1
- package/dist/esm/components/agent-builder/components/ChannelsSection.d.ts +0 -10
- package/dist/esm/components/agent-builder/components/ChannelsSection.js +0 -183
- package/dist/esm/components/agent-builder/components/ChannelsSection.js.map +0 -1
- package/dist/esm/components/agent-builder/constants/channels.d.ts +0 -56
- package/dist/esm/components/agent-builder/constants/channels.js +0 -41
- package/dist/esm/components/agent-builder/constants/channels.js.map +0 -1
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { jsxs as u, jsx as i, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { TitleSmall as ie, BodyCaption as
|
|
4
|
-
import { COLORS as
|
|
5
|
-
import { Step3Root as
|
|
6
|
-
import { ConfigToolPanel as
|
|
7
|
-
import { CreateSubAgentPanel as
|
|
1
|
+
import { jsxs as u, jsx as i, Fragment as We } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useRef as ne, useCallback as c, useEffect as $ } from "react";
|
|
3
|
+
import { TitleSmall as ie, BodyCaption as ze, BodySecondary as le } from "../../TypographyStyle.js";
|
|
4
|
+
import { COLORS as R } from "../../../constants/Theme.js";
|
|
5
|
+
import { Step3Root as Ve, Step3Grid as je, SectionBodyWrap as ae, Step3Divider as $e, SideSection as se, SideSectionHeader as Je } from "../AgentBuilder.styled.js";
|
|
6
|
+
import { ConfigToolPanel as Qe } from "../components/ConfigToolPanel.js";
|
|
7
|
+
import { CreateSubAgentPanel as Xe } from "../components/CreateSubAgentPanel.js";
|
|
8
8
|
import { MentionField as re } from "../components/MentionField.js";
|
|
9
|
-
import { RequireVerificationModal as
|
|
10
|
-
import { RestApiToolPanel as
|
|
9
|
+
import { RequireVerificationModal as Ye } from "../components/RequireVerificationModal.js";
|
|
10
|
+
import { RestApiToolPanel as Ze } from "../components/RestApiToolPanel.js";
|
|
11
11
|
import { SelectableListSection as ce } from "../components/SelectableListSection.js";
|
|
12
|
-
import { StepSectionHeader as
|
|
13
|
-
import { STEP_DEFINITIONS as
|
|
14
|
-
import { ToolSource as p, CONFIG_TOOL_SOURCES as
|
|
15
|
-
import { useAgentBuilderContext as
|
|
16
|
-
import { restApiMentionItem as
|
|
17
|
-
import { sourceIcon as Se, SOURCE_ICONS as pe, renderSourceIcon as
|
|
18
|
-
import { buildToolActions as
|
|
19
|
-
import
|
|
12
|
+
import { StepSectionHeader as et } from "../components/StepSectionHeader.js";
|
|
13
|
+
import { STEP_DEFINITIONS as tt } from "../constants/steps.js";
|
|
14
|
+
import { ToolSource as p, CONFIG_TOOL_SOURCES as ot } from "../constants/tools.js";
|
|
15
|
+
import { useAgentBuilderContext as nt } from "../context/AgentBuilderContext.js";
|
|
16
|
+
import { restApiMentionItem as it, configToolMentionItem as lt, restApiToolName as at, configToolName as st, toolSourceLabel as rt, buildAgentMentionItems as de, buildCustomToolMentionItems as ct, appTypeLabel as ue } from "../utils/mentionSerialization.js";
|
|
17
|
+
import { sourceIcon as Se, SOURCE_ICONS as pe, renderSourceIcon as dt } from "../utils/sourceIcons.js";
|
|
18
|
+
import { buildToolActions as ut } from "../utils/toolActions.js";
|
|
19
|
+
import pt from "../../../icons/Informational/Common UI/Shield.js";
|
|
20
20
|
import { Dropdown as me } from "../../dropdown/Dropdown.js";
|
|
21
21
|
import { unwrapDropdownValue as ge } from "../../dropdown/utils.js";
|
|
22
|
-
import { Tooltip as
|
|
23
|
-
import { Switch as
|
|
24
|
-
const
|
|
22
|
+
import { Tooltip as mt } from "../../tooltips/Tooltip.js";
|
|
23
|
+
import { Switch as gt } from "../../switch/Switch.js";
|
|
24
|
+
const ft = (n) => dt(Se(n)) ?? void 0, fe = (n) => ({
|
|
25
25
|
label: n.display_name,
|
|
26
26
|
value: n.tool_id,
|
|
27
|
-
leadingIcon:
|
|
28
|
-
}), he =
|
|
27
|
+
leadingIcon: ft(n.source ?? p.Manifest)
|
|
28
|
+
}), he = tt[2], J = [
|
|
29
29
|
{ label: "OTP to phone", value: "phone_otp" },
|
|
30
30
|
{ label: "OTP to email", value: "email_otp" }
|
|
31
31
|
], be = (n, l) => {
|
|
32
32
|
const y = n ?? [];
|
|
33
33
|
return y.some((m) => m.id === l.id) ? y.map((m) => m.id === l.id ? l : m) : [...y, l];
|
|
34
|
-
},
|
|
34
|
+
}, Kt = () => {
|
|
35
35
|
const {
|
|
36
36
|
value: n,
|
|
37
37
|
patch: l,
|
|
38
38
|
updateField: y,
|
|
39
39
|
addReference: m,
|
|
40
|
-
removeReference:
|
|
40
|
+
removeReference: Q,
|
|
41
41
|
availableTools: s,
|
|
42
42
|
availableSubAgents: Te,
|
|
43
|
-
availableModels:
|
|
44
|
-
configToolTemplates:
|
|
45
|
-
applicationType:
|
|
43
|
+
availableModels: E,
|
|
44
|
+
configToolTemplates: N,
|
|
45
|
+
applicationType: X,
|
|
46
46
|
charLimits: v,
|
|
47
47
|
insertMention: d,
|
|
48
48
|
onCreateSubAgent: h,
|
|
49
|
-
onFetchSubAgent:
|
|
50
|
-
onUpdateSubAgent:
|
|
49
|
+
onFetchSubAgent: _,
|
|
50
|
+
onUpdateSubAgent: q,
|
|
51
51
|
onImproveSubAgent: ye,
|
|
52
|
-
onImproveToolInstructions:
|
|
53
|
-
registerSubAgentCreator:
|
|
54
|
-
registerToolActionHandler:
|
|
52
|
+
onImproveToolInstructions: D,
|
|
53
|
+
registerSubAgentCreator: P,
|
|
54
|
+
registerToolActionHandler: H,
|
|
55
55
|
integrationStatus: L,
|
|
56
|
-
onConnectIntegration:
|
|
57
|
-
variablesData:
|
|
58
|
-
} =
|
|
59
|
-
|
|
60
|
-
key:
|
|
56
|
+
onConnectIntegration: K,
|
|
57
|
+
variablesData: B
|
|
58
|
+
} = nt(), [g, O] = w(null), k = ne(0), [a, b] = w(null), x = ne(0), F = c((e) => {
|
|
59
|
+
x.current += 1, b({
|
|
60
|
+
key: x.current,
|
|
61
61
|
kind: "restapi",
|
|
62
62
|
initialRest: e
|
|
63
63
|
});
|
|
64
|
-
}, []),
|
|
64
|
+
}, []), G = c(
|
|
65
65
|
(e, t) => {
|
|
66
|
-
|
|
67
|
-
key:
|
|
66
|
+
x.current += 1, b({
|
|
67
|
+
key: x.current,
|
|
68
68
|
kind: "config",
|
|
69
69
|
toolKey: e,
|
|
70
70
|
initialConfig: t
|
|
@@ -77,7 +77,7 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
77
77
|
l({ restApiTools: be(n.restApiTools, e) }), t && d(
|
|
78
78
|
"tool",
|
|
79
79
|
e.id,
|
|
80
|
-
|
|
80
|
+
it(e).label,
|
|
81
81
|
p.RestApi
|
|
82
82
|
), b(null);
|
|
83
83
|
},
|
|
@@ -90,76 +90,76 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
90
90
|
d(
|
|
91
91
|
"tool",
|
|
92
92
|
e.id,
|
|
93
|
-
|
|
93
|
+
lt(e).label,
|
|
94
94
|
o
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
b(null);
|
|
98
98
|
},
|
|
99
99
|
[l, n.configTools, d]
|
|
100
|
-
),
|
|
100
|
+
), U = c(
|
|
101
101
|
(e) => {
|
|
102
|
-
const t =
|
|
103
|
-
t ?
|
|
102
|
+
const t = ot[e];
|
|
103
|
+
t ? G(t) : F();
|
|
104
104
|
},
|
|
105
|
-
[
|
|
105
|
+
[G, F]
|
|
106
106
|
);
|
|
107
|
-
|
|
108
|
-
const [Ie,
|
|
107
|
+
$(() => (H(U), () => H(null)), [H, U]);
|
|
108
|
+
const [Ie, Y] = w([]), [Ce, we] = w(() => /* @__PURE__ */ new Set()), A = /* @__PURE__ */ new Map();
|
|
109
109
|
Te.forEach((e) => A.set(e.id, e)), Ie.forEach((e) => A.set(e.id, e));
|
|
110
|
-
const
|
|
111
|
-
|
|
110
|
+
const Z = Array.from(A.values()), W = c(() => {
|
|
111
|
+
k.current += 1, O({ key: k.current, title: "Create sub-agent" });
|
|
112
112
|
}, []);
|
|
113
|
-
|
|
113
|
+
$(() => {
|
|
114
114
|
if (h)
|
|
115
|
-
return
|
|
116
|
-
}, [
|
|
115
|
+
return P(W), () => P(null);
|
|
116
|
+
}, [P, W, h]);
|
|
117
117
|
const Re = c(
|
|
118
118
|
async (e) => {
|
|
119
|
-
if (!
|
|
119
|
+
if (!_)
|
|
120
120
|
return;
|
|
121
|
-
const t = await
|
|
122
|
-
|
|
123
|
-
key:
|
|
121
|
+
const t = await _(e);
|
|
122
|
+
k.current += 1, O({
|
|
123
|
+
key: k.current,
|
|
124
124
|
title: "Edit sub-agent",
|
|
125
125
|
editingId: e,
|
|
126
126
|
initial: t
|
|
127
127
|
});
|
|
128
128
|
},
|
|
129
|
-
[
|
|
129
|
+
[_]
|
|
130
130
|
), _e = n.tools.some(
|
|
131
131
|
(e) => s.find((t) => t.tool_id === e)?.auth_required
|
|
132
132
|
), Oe = n.subagents.some(
|
|
133
133
|
(e) => Ce.has(e)
|
|
134
|
-
), f = _e || Oe, S = n.authentication?.enabled ?? !1, T = n.authentication?.type ?? "email_otp", ke =
|
|
134
|
+
), f = _e || Oe, S = n.authentication?.enabled ?? !1, T = n.authentication?.type ?? "email_otp", ke = c(
|
|
135
135
|
async (e) => {
|
|
136
136
|
let t;
|
|
137
137
|
if (g?.editingId) {
|
|
138
|
-
if (
|
|
139
|
-
const o = await
|
|
140
|
-
t = o.id,
|
|
141
|
-
...r.filter((
|
|
138
|
+
if (q) {
|
|
139
|
+
const o = await q(g.editingId, e);
|
|
140
|
+
t = o.id, Y((r) => [
|
|
141
|
+
...r.filter((I) => I.id !== o.id),
|
|
142
142
|
o
|
|
143
143
|
]);
|
|
144
144
|
}
|
|
145
145
|
} else if (h) {
|
|
146
146
|
const o = await h(e);
|
|
147
|
-
t = o.id,
|
|
147
|
+
t = o.id, Y((r) => [...r, o]), l({ subagents: [...n.subagents, o.id] }), d("subagent", o.id, `sub-agent: ${o.name}`);
|
|
148
148
|
}
|
|
149
149
|
if (t) {
|
|
150
150
|
const o = t, r = e.tools.some(
|
|
151
|
-
(
|
|
151
|
+
(I) => s.find((C) => C.tool_id === I)?.auth_required
|
|
152
152
|
);
|
|
153
|
-
we((
|
|
154
|
-
const
|
|
155
|
-
return r ?
|
|
153
|
+
we((I) => {
|
|
154
|
+
const C = new Set(I);
|
|
155
|
+
return r ? C.add(o) : C.delete(o), C;
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
|
|
158
|
+
O(null);
|
|
159
159
|
},
|
|
160
160
|
[
|
|
161
161
|
g,
|
|
162
|
-
|
|
162
|
+
q,
|
|
163
163
|
h,
|
|
164
164
|
l,
|
|
165
165
|
n.subagents,
|
|
@@ -167,24 +167,24 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
167
167
|
s
|
|
168
168
|
]
|
|
169
169
|
);
|
|
170
|
-
|
|
170
|
+
$(() => {
|
|
171
171
|
f && !S && l({ authentication: { enabled: !0, type: T } });
|
|
172
172
|
}, [f, S, T, l]);
|
|
173
|
-
const [
|
|
173
|
+
const [M, z] = w(null), V = c(
|
|
174
174
|
(e) => {
|
|
175
175
|
d("tool", e), m("tool", e);
|
|
176
176
|
},
|
|
177
177
|
[d, m]
|
|
178
|
-
),
|
|
178
|
+
), xe = c(
|
|
179
179
|
(e) => {
|
|
180
180
|
if (s.find((o) => o.tool_id === e)?.auth_required && !S) {
|
|
181
|
-
|
|
181
|
+
z(e);
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
V(e);
|
|
185
185
|
},
|
|
186
|
-
[s, S,
|
|
187
|
-
),
|
|
186
|
+
[s, S, V]
|
|
187
|
+
), Me = n.tools.map((e) => {
|
|
188
188
|
const t = s.find((o) => o.tool_id === e);
|
|
189
189
|
return t ? {
|
|
190
190
|
id: e,
|
|
@@ -192,62 +192,62 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
192
192
|
icon: Se(t.source ?? p.Manifest),
|
|
193
193
|
authRequired: t.auth_required
|
|
194
194
|
} : null;
|
|
195
|
-
}).filter((e) => e !== null),
|
|
195
|
+
}).filter((e) => e !== null), Ee = (n.restApiTools ?? []).map(
|
|
196
196
|
(e) => ({
|
|
197
197
|
id: e.id,
|
|
198
|
-
label:
|
|
198
|
+
label: at(e),
|
|
199
199
|
icon: pe[p.RestApi],
|
|
200
|
-
onConfigure: () =>
|
|
200
|
+
onConfigure: () => F(e)
|
|
201
201
|
})
|
|
202
|
-
),
|
|
202
|
+
), Ne = (n.configTools ?? []).map(
|
|
203
203
|
(e) => ({
|
|
204
204
|
id: e.id,
|
|
205
|
-
label:
|
|
205
|
+
label: st(e),
|
|
206
206
|
icon: pe[e.tool_key === "send_slack_message" ? p.Slack : p.EmailHandover],
|
|
207
|
-
onConfigure: () =>
|
|
207
|
+
onConfigure: () => G(e.tool_key, e)
|
|
208
208
|
})
|
|
209
|
-
),
|
|
209
|
+
), qe = [
|
|
210
|
+
...Me,
|
|
210
211
|
...Ee,
|
|
211
|
-
...Ne
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
W,
|
|
212
|
+
...Ne
|
|
213
|
+
], De = ut(
|
|
214
|
+
N,
|
|
215
|
+
U,
|
|
216
216
|
L,
|
|
217
|
-
|
|
218
|
-
),
|
|
217
|
+
K
|
|
218
|
+
), Pe = s.map(fe), He = (() => {
|
|
219
219
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
220
220
|
return s.forEach((o) => {
|
|
221
221
|
const r = o.source ?? p.Manifest;
|
|
222
222
|
t.has(r) || (t.set(r, []), e.push(r)), t.get(r)?.push(fe(o));
|
|
223
223
|
}), e.map((o) => ({
|
|
224
224
|
source: o,
|
|
225
|
-
label:
|
|
225
|
+
label: rt(o),
|
|
226
226
|
options: t.get(o) ?? [],
|
|
227
227
|
// Not connected → the source button opens the connect flow instead of
|
|
228
228
|
// its tool list (see SelectableListSection / onConnectIntegration).
|
|
229
229
|
connected: L?.[o],
|
|
230
|
-
onConnect: () =>
|
|
230
|
+
onConnect: () => K?.(o)
|
|
231
231
|
}));
|
|
232
232
|
})(), Le = n.subagents.map((e) => {
|
|
233
233
|
const t = A.get(e);
|
|
234
234
|
return t ? { id: e, label: t.name } : null;
|
|
235
|
-
}).filter((e) => e !== null),
|
|
235
|
+
}).filter((e) => e !== null), Ke = Z.map((e) => ({
|
|
236
236
|
label: e.name,
|
|
237
237
|
value: e.id
|
|
238
|
-
})),
|
|
239
|
-
...de(s, [],
|
|
240
|
-
...
|
|
241
|
-
],
|
|
238
|
+
})), ee = ue(X), Be = [
|
|
239
|
+
...de(s, [], ee),
|
|
240
|
+
...ct(n.configTools, n.restApiTools)
|
|
241
|
+
], Fe = de(
|
|
242
242
|
[],
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
),
|
|
243
|
+
Z,
|
|
244
|
+
ee
|
|
245
|
+
), Ge = E.map((e) => ({
|
|
246
246
|
label: e.label,
|
|
247
247
|
value: e.value,
|
|
248
248
|
selected: e.value === n.model
|
|
249
|
-
})),
|
|
250
|
-
|
|
249
|
+
})), j = E.find((e) => e.value === n.model), te = a?.kind === "config" && a.toolKey ? N?.[a.toolKey] : void 0, oe = /* @__PURE__ */ i(
|
|
250
|
+
gt,
|
|
251
251
|
{
|
|
252
252
|
"data-test": "agent-auth-toggle",
|
|
253
253
|
value: S || f,
|
|
@@ -256,17 +256,17 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
256
256
|
l({ authentication: { enabled: e, type: T } });
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
),
|
|
260
|
-
|
|
259
|
+
), Ue = f ? /* @__PURE__ */ i(
|
|
260
|
+
mt,
|
|
261
261
|
{
|
|
262
262
|
body: "Remove tools that requires customer verification to change this setting.",
|
|
263
263
|
placement: "bottom",
|
|
264
264
|
children: /* @__PURE__ */ i("span", { style: { display: "flex" }, children: oe })
|
|
265
265
|
}
|
|
266
266
|
) : oe;
|
|
267
|
-
return /* @__PURE__ */ u(
|
|
268
|
-
/* @__PURE__ */ i(
|
|
269
|
-
/* @__PURE__ */ u(
|
|
267
|
+
return /* @__PURE__ */ u(Ve, { children: [
|
|
268
|
+
/* @__PURE__ */ i(et, { title: he.title, helper: he.helper }),
|
|
269
|
+
/* @__PURE__ */ u(je, { $grow: !0, children: [
|
|
270
270
|
/* @__PURE__ */ u(ae, { children: [
|
|
271
271
|
/* @__PURE__ */ i(
|
|
272
272
|
re,
|
|
@@ -291,7 +291,7 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
291
291
|
}
|
|
292
292
|
)
|
|
293
293
|
] }),
|
|
294
|
-
/* @__PURE__ */ i(
|
|
294
|
+
/* @__PURE__ */ i($e, {}),
|
|
295
295
|
/* @__PURE__ */ u(ae, { children: [
|
|
296
296
|
/* @__PURE__ */ i(
|
|
297
297
|
ce,
|
|
@@ -299,15 +299,14 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
299
299
|
title: "Tools",
|
|
300
300
|
helper: "Actions this agent can take while responding.",
|
|
301
301
|
dataTestPrefix: "agent-tools",
|
|
302
|
-
items:
|
|
303
|
-
addableOptions:
|
|
304
|
-
sourceGroups:
|
|
305
|
-
mentionItems:
|
|
306
|
-
actionSources:
|
|
302
|
+
items: qe,
|
|
303
|
+
addableOptions: Pe,
|
|
304
|
+
sourceGroups: He,
|
|
305
|
+
mentionItems: Be,
|
|
306
|
+
actionSources: De,
|
|
307
307
|
emptyText: "No tools added yet.",
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
onRemove: (e) => X("tool", e),
|
|
308
|
+
onAdd: xe,
|
|
309
|
+
onRemove: (e) => Q("tool", e),
|
|
311
310
|
confirmDelete: { noun: "tool" }
|
|
312
311
|
}
|
|
313
312
|
),
|
|
@@ -318,29 +317,29 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
318
317
|
helper: "Other agents this agent can hand off the conversation to.",
|
|
319
318
|
dataTestPrefix: "agent-subagents",
|
|
320
319
|
items: Le,
|
|
321
|
-
addableOptions:
|
|
322
|
-
mentionItems:
|
|
320
|
+
addableOptions: Ke,
|
|
321
|
+
mentionItems: Fe,
|
|
323
322
|
emptyText: "No sub-agents added yet.",
|
|
324
323
|
onAdd: (e) => {
|
|
325
324
|
d("subagent", e), m("subagent", e);
|
|
326
325
|
},
|
|
327
|
-
onRemove: (e) =>
|
|
326
|
+
onRemove: (e) => Q("subagent", e),
|
|
328
327
|
confirmDelete: { noun: "sub-agent" },
|
|
329
|
-
onConfigure:
|
|
330
|
-
createOption: h ? { label: "Create new", onSelect:
|
|
328
|
+
onConfigure: _ ? Re : void 0,
|
|
329
|
+
createOption: h ? { label: "Create new", onSelect: W } : void 0
|
|
331
330
|
}
|
|
332
331
|
),
|
|
333
332
|
/* @__PURE__ */ u(se, { children: [
|
|
334
|
-
/* @__PURE__ */ u(
|
|
333
|
+
/* @__PURE__ */ u(Je, { children: [
|
|
335
334
|
/* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
336
|
-
/* @__PURE__ */ i(
|
|
337
|
-
/* @__PURE__ */ i(ie, { color:
|
|
335
|
+
/* @__PURE__ */ i(pt, { size: 20 }),
|
|
336
|
+
/* @__PURE__ */ i(ie, { color: R.content.primary, children: "Require customer verification" })
|
|
338
337
|
] }),
|
|
339
|
-
|
|
338
|
+
Ue
|
|
340
339
|
] }),
|
|
341
|
-
/* @__PURE__ */ i(
|
|
342
|
-
|
|
343
|
-
/* @__PURE__ */ i(le, { color:
|
|
340
|
+
/* @__PURE__ */ i(ze, { 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." }),
|
|
341
|
+
(S || f) && /* @__PURE__ */ u(We, { children: [
|
|
342
|
+
/* @__PURE__ */ i(le, { color: R.content.primary, children: "Select verification method" }),
|
|
344
343
|
/* @__PURE__ */ i(
|
|
345
344
|
me,
|
|
346
345
|
{
|
|
@@ -349,12 +348,12 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
349
348
|
width: "100%",
|
|
350
349
|
dropdownWidth: "328px",
|
|
351
350
|
placeHolder: "Select verification method",
|
|
352
|
-
options:
|
|
351
|
+
options: J.map((e) => ({
|
|
353
352
|
...e,
|
|
354
353
|
selected: e.value === T
|
|
355
354
|
})),
|
|
356
355
|
defaultOptions: [
|
|
357
|
-
|
|
356
|
+
J.find((e) => e.value === T) ?? J[0]
|
|
358
357
|
],
|
|
359
358
|
onSelect: (e) => {
|
|
360
359
|
const t = ge(e);
|
|
@@ -369,9 +368,9 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
369
368
|
)
|
|
370
369
|
] })
|
|
371
370
|
] }),
|
|
372
|
-
|
|
373
|
-
/* @__PURE__ */ i(ie, { color:
|
|
374
|
-
/* @__PURE__ */ i(le, { color:
|
|
371
|
+
E.length > 0 && /* @__PURE__ */ u(se, { children: [
|
|
372
|
+
/* @__PURE__ */ i(ie, { color: R.content.primary, children: "Advanced settings" }),
|
|
373
|
+
/* @__PURE__ */ i(le, { color: R.content.primary, children: "Select AI model" }),
|
|
375
374
|
/* @__PURE__ */ i(
|
|
376
375
|
me,
|
|
377
376
|
{
|
|
@@ -380,11 +379,11 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
380
379
|
width: "100%",
|
|
381
380
|
dropdownWidth: "328px",
|
|
382
381
|
placeHolder: "Select model",
|
|
383
|
-
options:
|
|
384
|
-
defaultOptions:
|
|
382
|
+
options: Ge,
|
|
383
|
+
defaultOptions: j ? [
|
|
385
384
|
{
|
|
386
|
-
label:
|
|
387
|
-
value:
|
|
385
|
+
label: j.label,
|
|
386
|
+
value: j.value
|
|
388
387
|
}
|
|
389
388
|
] : void 0,
|
|
390
389
|
onSelect: (e) => {
|
|
@@ -397,66 +396,66 @@ const ht = (n) => ut(Se(n)) ?? void 0, fe = (n) => ({
|
|
|
397
396
|
] })
|
|
398
397
|
] }),
|
|
399
398
|
g && /* @__PURE__ */ i(
|
|
400
|
-
|
|
399
|
+
Xe,
|
|
401
400
|
{
|
|
402
401
|
title: g.title,
|
|
403
402
|
initial: g.initial,
|
|
404
403
|
existingNames: n.subagents.filter((e) => e !== g.editingId).map((e) => A.get(e)?.name).filter((e) => !!e),
|
|
405
404
|
availableTools: s,
|
|
406
|
-
configToolTemplates:
|
|
407
|
-
variablesData:
|
|
405
|
+
configToolTemplates: N,
|
|
406
|
+
variablesData: B,
|
|
408
407
|
integrationStatus: L,
|
|
409
|
-
onConnectIntegration:
|
|
410
|
-
appLabel:
|
|
408
|
+
onConnectIntegration: K,
|
|
409
|
+
appLabel: ue(X),
|
|
411
410
|
charLimits: v,
|
|
412
411
|
onImprove: ye,
|
|
413
|
-
onImproveToolInstructions:
|
|
414
|
-
onClose: () =>
|
|
415
|
-
onSave:
|
|
412
|
+
onImproveToolInstructions: D,
|
|
413
|
+
onClose: () => O(null),
|
|
414
|
+
onSave: ke
|
|
416
415
|
},
|
|
417
416
|
g.key
|
|
418
417
|
),
|
|
419
418
|
a?.kind === "restapi" && /* @__PURE__ */ i(
|
|
420
|
-
|
|
419
|
+
Ze,
|
|
421
420
|
{
|
|
422
421
|
initial: a.initialRest,
|
|
423
422
|
charLimits: v,
|
|
424
|
-
variablesData:
|
|
423
|
+
variablesData: B,
|
|
425
424
|
existingNames: (n.restApiTools ?? []).filter((e) => e.id !== a.initialRest?.id).map((e) => e.name),
|
|
426
|
-
onImprove:
|
|
425
|
+
onImprove: D,
|
|
427
426
|
onClose: () => b(null),
|
|
428
427
|
onSave: ve
|
|
429
428
|
},
|
|
430
429
|
a.key
|
|
431
430
|
),
|
|
432
431
|
a?.kind === "config" && a.toolKey && te && /* @__PURE__ */ i(
|
|
433
|
-
|
|
432
|
+
Qe,
|
|
434
433
|
{
|
|
435
434
|
toolKey: a.toolKey,
|
|
436
435
|
template: te,
|
|
437
436
|
initial: a.initialConfig,
|
|
438
437
|
charLimits: v,
|
|
439
|
-
variablesData:
|
|
440
|
-
onImprove:
|
|
438
|
+
variablesData: B,
|
|
439
|
+
onImprove: D,
|
|
441
440
|
onClose: () => b(null),
|
|
442
441
|
onSave: Ae
|
|
443
442
|
},
|
|
444
443
|
a.key
|
|
445
444
|
),
|
|
446
445
|
/* @__PURE__ */ i(
|
|
447
|
-
|
|
446
|
+
Ye,
|
|
448
447
|
{
|
|
449
|
-
open:
|
|
450
|
-
toolLabel: s.find((e) => e.tool_id ===
|
|
451
|
-
onCancel: () =>
|
|
448
|
+
open: M !== null,
|
|
449
|
+
toolLabel: s.find((e) => e.tool_id === M)?.display_name ?? "This tool",
|
|
450
|
+
onCancel: () => z(null),
|
|
452
451
|
onConfirm: () => {
|
|
453
|
-
l({ authentication: { enabled: !0, type: T } }),
|
|
452
|
+
l({ authentication: { enabled: !0, type: T } }), M && V(M), z(null);
|
|
454
453
|
}
|
|
455
454
|
}
|
|
456
455
|
)
|
|
457
456
|
] });
|
|
458
457
|
};
|
|
459
458
|
export {
|
|
460
|
-
|
|
459
|
+
Kt as Step3HowItResponds
|
|
461
460
|
};
|
|
462
461
|
//# sourceMappingURL=Step3HowItResponds.js.map
|