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