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