@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,29 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as i, useRef as y, useMemo as
|
|
3
|
-
import
|
|
4
|
-
import { addUnique as
|
|
5
|
-
import { COLORS as
|
|
6
|
-
import { AGENT_CHAR_LIMITS as
|
|
7
|
-
import { CONFIG_TOOL_SOURCES as
|
|
8
|
-
import { buildAgentMentionItems as
|
|
9
|
-
import { sourceIcon as
|
|
10
|
-
import { buildToolActions as
|
|
11
|
-
import { ConfigToolPanel as
|
|
12
|
-
import { DRAWER_BODY_STYLE as
|
|
13
|
-
import { MentionEditor as
|
|
14
|
-
import { RestApiToolPanel as
|
|
15
|
-
import { SelectableListSection as
|
|
16
|
-
import { SideModal as
|
|
17
|
-
import { Input as
|
|
18
|
-
import { Toaster as
|
|
19
|
-
const
|
|
1
|
+
import { jsxs as ue, Fragment as Be, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as i, useRef as y, useMemo as Le, useCallback as l } from "react";
|
|
3
|
+
import Pe from "styled-components";
|
|
4
|
+
import { addUnique as de } from "../../../utils/arrayUtils.js";
|
|
5
|
+
import { COLORS as Y } from "../../../constants/Theme.js";
|
|
6
|
+
import { AGENT_CHAR_LIMITS as ze } from "../constants/charLimits.js";
|
|
7
|
+
import { CONFIG_TOOL_SOURCES as He, ToolSource as u } from "../constants/tools.js";
|
|
8
|
+
import { buildAgentMentionItems as Ue, buildCustomToolMentionItems as $e, restApiMentionItem as Fe, configToolMentionItem as je, restApiToolName as We, configToolName as qe, toolSourceLabel as Ye } from "../utils/mentionSerialization.js";
|
|
9
|
+
import { sourceIcon as X, SOURCE_ICONS as me, renderSourceIcon as pe } from "../utils/sourceIcons.js";
|
|
10
|
+
import { buildToolActions as Xe } from "../utils/toolActions.js";
|
|
11
|
+
import { ConfigToolPanel as Ze } from "./ConfigToolPanel.js";
|
|
12
|
+
import { DRAWER_BODY_STYLE as Je, DRAWER_HEADER_STYLE as Qe, DrawerHeaderText as Ve } from "./DrawerHeaderText.js";
|
|
13
|
+
import { MentionEditor as fe } from "./MentionEditor.js";
|
|
14
|
+
import { RestApiToolPanel as et } from "./RestApiToolPanel.js";
|
|
15
|
+
import { SelectableListSection as tt } from "./SelectableListSection.js";
|
|
16
|
+
import { SideModal as ot } from "../../side-modal/SideModal.js";
|
|
17
|
+
import { Input as nt } from "../../input/Input.js";
|
|
18
|
+
import { Toaster as st } from "../../toaster/Toaster.js";
|
|
19
|
+
const rt = 1e3, Z = 1002, ge = (x, f) => {
|
|
20
20
|
const s = x ?? [];
|
|
21
|
-
return s.some((d) => d.id ===
|
|
22
|
-
},
|
|
21
|
+
return s.some((d) => d.id === f.id) ? s.map((d) => d.id === f.id ? f : d) : [...s, f];
|
|
22
|
+
}, he = Pe.button`
|
|
23
23
|
align-self: flex-start;
|
|
24
|
-
border: 1px solid ${
|
|
25
|
-
color: ${
|
|
26
|
-
background: ${
|
|
24
|
+
border: 1px solid ${Y.stroke.primary};
|
|
25
|
+
color: ${Y.content.primary};
|
|
26
|
+
background: ${Y.surface.standard};
|
|
27
27
|
border-radius: 8px;
|
|
28
28
|
padding: 6px 12px;
|
|
29
29
|
font-size: 13px;
|
|
@@ -35,207 +35,218 @@ const nt = 1e3, X = 1002, pe = (x, g) => {
|
|
|
35
35
|
cursor: default;
|
|
36
36
|
opacity: 0.6;
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
38
|
+
`, xt = ({
|
|
39
39
|
onClose: x,
|
|
40
|
-
onSave:
|
|
40
|
+
onSave: f,
|
|
41
41
|
availableTools: s,
|
|
42
42
|
onImprove: d,
|
|
43
|
-
onImproveToolInstructions:
|
|
44
|
-
configToolTemplates:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
onImproveToolInstructions: J,
|
|
44
|
+
configToolTemplates: Q,
|
|
45
|
+
integrationStatus: A,
|
|
46
|
+
onConnectIntegration: R,
|
|
47
|
+
title: V = "Create sub-agent",
|
|
48
|
+
initial: g,
|
|
49
|
+
existingNames: ye = [],
|
|
50
|
+
appLabel: ee = "Manifest",
|
|
51
|
+
charLimits: b = ze
|
|
50
52
|
}) => {
|
|
51
|
-
const [
|
|
52
|
-
|
|
53
|
-
), [m,
|
|
54
|
-
|
|
55
|
-
), [a, h] = i(null),
|
|
53
|
+
const [O, be] = i(g?.name ?? ""), [T, _] = i(g?.instructions ?? ""), [C, w] = i(g?.guardrail ?? ""), [D, k] = i(g?.tools ?? []), [p, K] = i(
|
|
54
|
+
g?.configTools ?? []
|
|
55
|
+
), [m, N] = i(
|
|
56
|
+
g?.restApiTools ?? []
|
|
57
|
+
), [a, h] = i(null), E = y(0), [te, oe] = i(!1), [Te, G] = i(0), [Ce, B] = i(0), [v, ne] = i(null), L = Le(
|
|
56
58
|
() => [
|
|
57
|
-
...
|
|
58
|
-
|
|
59
|
+
...Ue(s, [], ee),
|
|
60
|
+
...$e(p, m)
|
|
59
61
|
],
|
|
60
|
-
[s,
|
|
61
|
-
),
|
|
62
|
-
|
|
63
|
-
}, []),
|
|
64
|
-
|
|
65
|
-
}, []), Ie = l(() => {
|
|
66
|
-
B.current = "instructions";
|
|
62
|
+
[s, ee, p, m]
|
|
63
|
+
), M = y({}), P = y("instructions"), ve = l((e) => {
|
|
64
|
+
M.current.instructions = e ?? void 0;
|
|
65
|
+
}, []), Ie = l((e) => {
|
|
66
|
+
M.current.guardrail = e ?? void 0;
|
|
67
67
|
}, []), Se = l(() => {
|
|
68
|
-
|
|
69
|
-
}, []),
|
|
70
|
-
|
|
68
|
+
P.current = "instructions";
|
|
69
|
+
}, []), xe = l(() => {
|
|
70
|
+
P.current = "guardrail";
|
|
71
|
+
}, []), se = y(/* @__PURE__ */ new Set());
|
|
72
|
+
se.current = new Set(
|
|
71
73
|
[...p, ...m].map((e) => e.id)
|
|
72
74
|
);
|
|
73
|
-
const
|
|
75
|
+
const re = l(
|
|
74
76
|
(e, t) => {
|
|
75
|
-
e === "tool" && !
|
|
77
|
+
e === "tool" && !se.current.has(t) && k((o) => de(o, t));
|
|
76
78
|
},
|
|
77
79
|
[]
|
|
78
|
-
),
|
|
80
|
+
), I = l(
|
|
79
81
|
(e, t, o) => {
|
|
80
|
-
(
|
|
82
|
+
(M.current[P.current] ?? M.current.instructions)?.("tool", e, t, o);
|
|
81
83
|
},
|
|
82
84
|
[]
|
|
83
|
-
),
|
|
84
|
-
|
|
85
|
-
key:
|
|
85
|
+
), z = l((e) => {
|
|
86
|
+
E.current += 1, h({
|
|
87
|
+
key: E.current,
|
|
86
88
|
kind: "restapi",
|
|
87
89
|
initialRest: e
|
|
88
90
|
});
|
|
89
|
-
}, []),
|
|
91
|
+
}, []), H = l(
|
|
90
92
|
(e, t) => {
|
|
91
|
-
|
|
92
|
-
key:
|
|
93
|
+
E.current += 1, h({
|
|
94
|
+
key: E.current,
|
|
93
95
|
kind: "config",
|
|
94
96
|
toolKey: e,
|
|
95
97
|
initialConfig: t
|
|
96
98
|
});
|
|
97
99
|
},
|
|
98
100
|
[]
|
|
99
|
-
),
|
|
101
|
+
), Ae = l(
|
|
100
102
|
(e) => {
|
|
101
|
-
const t =
|
|
102
|
-
t ?
|
|
103
|
+
const t = He[e];
|
|
104
|
+
t ? H(t) : z();
|
|
103
105
|
},
|
|
104
|
-
[
|
|
105
|
-
),
|
|
106
|
+
[H, z]
|
|
107
|
+
), Re = l(
|
|
106
108
|
(e) => {
|
|
107
109
|
const t = !m.some((o) => o.id === e.id);
|
|
108
|
-
|
|
110
|
+
N((o) => ge(o, e)), t && I(
|
|
109
111
|
e.id,
|
|
110
|
-
|
|
112
|
+
Fe(e).label,
|
|
111
113
|
u.RestApi
|
|
112
114
|
), h(null);
|
|
113
115
|
},
|
|
114
|
-
[m,
|
|
115
|
-
),
|
|
116
|
+
[m, I]
|
|
117
|
+
), _e = l(
|
|
116
118
|
(e) => {
|
|
117
119
|
const t = !p.some((o) => o.id === e.id);
|
|
118
|
-
if (
|
|
120
|
+
if (K((o) => ge(o, e)), t) {
|
|
119
121
|
const o = e.tool_key === "send_slack_message" ? u.Slack : u.EmailHandover;
|
|
120
|
-
|
|
122
|
+
I(e.id, je(e).label, o);
|
|
121
123
|
}
|
|
122
124
|
h(null);
|
|
123
125
|
},
|
|
124
|
-
[p,
|
|
125
|
-
), [
|
|
126
|
+
[p, I]
|
|
127
|
+
), [U, $] = i(
|
|
126
128
|
null
|
|
127
|
-
),
|
|
129
|
+
), F = y(null), ie = y(0), we = (e) => {
|
|
128
130
|
const t = s.find((n) => n.tool_id === e)?.display_name ?? m.find((n) => n.id === e)?.name ?? "Tool", o = `{{tool:${e}}}`, r = (n) => n.split(o).join("");
|
|
129
|
-
|
|
131
|
+
F.current = {
|
|
130
132
|
instructions: T,
|
|
131
133
|
guardrail: C,
|
|
132
|
-
tools:
|
|
134
|
+
tools: D,
|
|
133
135
|
configTools: p,
|
|
134
136
|
restApiTools: m
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
const e =
|
|
138
|
-
e && (
|
|
139
|
-
},
|
|
140
|
-
(e) => e.trim().toLowerCase() ===
|
|
141
|
-
),
|
|
137
|
+
}, _((n) => r(n)), w((n) => r(n)), k((n) => n.filter((S) => S !== e)), K((n) => n.filter((S) => S.id !== e)), N((n) => n.filter((S) => S.id !== e)), G((n) => n + 1), B((n) => n + 1), ie.current += 1, $({ id: ie.current, message: `Tool "${t}" removed` });
|
|
138
|
+
}, ke = () => {
|
|
139
|
+
const e = F.current;
|
|
140
|
+
e && (_(e.instructions), w(e.guardrail), k(e.tools), K(e.configTools), N(e.restApiTools), G((t) => t + 1), B((t) => t + 1), F.current = null), $(null);
|
|
141
|
+
}, j = O.trim(), W = j.length > 0 && ye.some(
|
|
142
|
+
(e) => e.trim().toLowerCase() === j.toLowerCase()
|
|
143
|
+
), ae = j.length > 0 && !W && (T.trim().length > 0 || C.trim().length > 0), Ee = D.map((e) => {
|
|
142
144
|
const t = s.find((o) => o.tool_id === e);
|
|
143
145
|
return t ? {
|
|
144
146
|
id: e,
|
|
145
147
|
label: t.display_name,
|
|
146
|
-
icon:
|
|
148
|
+
icon: X(t.source ?? u.Manifest),
|
|
149
|
+
// Shield flags a tool that needs customer verification, same as
|
|
150
|
+
// the main builder's Step 3 tool rows.
|
|
151
|
+
authRequired: t.auth_required
|
|
147
152
|
} : null;
|
|
148
|
-
}).filter((e) => e !== null),
|
|
153
|
+
}).filter((e) => e !== null), Me = m.map((e) => ({
|
|
149
154
|
id: e.id,
|
|
150
|
-
label:
|
|
151
|
-
icon:
|
|
152
|
-
onConfigure: () =>
|
|
153
|
-
})),
|
|
155
|
+
label: We(e),
|
|
156
|
+
icon: me[u.RestApi],
|
|
157
|
+
onConfigure: () => z(e)
|
|
158
|
+
})), Oe = p.map((e) => ({
|
|
154
159
|
id: e.id,
|
|
155
|
-
label:
|
|
156
|
-
icon:
|
|
157
|
-
onConfigure: () =>
|
|
158
|
-
})),
|
|
159
|
-
...
|
|
160
|
-
...
|
|
161
|
-
...
|
|
162
|
-
],
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
label: qe(e),
|
|
161
|
+
icon: me[e.tool_key === "send_slack_message" ? u.Slack : u.EmailHandover],
|
|
162
|
+
onConfigure: () => H(e.tool_key, e)
|
|
163
|
+
})), De = [
|
|
164
|
+
...Ee,
|
|
165
|
+
...Me,
|
|
166
|
+
...Oe
|
|
167
|
+
], q = Xe(
|
|
168
|
+
Q,
|
|
169
|
+
Ae,
|
|
170
|
+
A,
|
|
171
|
+
R
|
|
172
|
+
), le = a?.kind === "config" && a.toolKey ? Q?.[a.toolKey] : void 0, Ke = s.map((e) => ({
|
|
166
173
|
label: e.display_name,
|
|
167
174
|
value: e.tool_id,
|
|
168
|
-
leadingIcon:
|
|
169
|
-
})),
|
|
175
|
+
leadingIcon: pe(X(e.source ?? u.Manifest)) ?? void 0
|
|
176
|
+
})), Ne = (() => {
|
|
170
177
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
171
178
|
return s.forEach((o) => {
|
|
172
179
|
const r = o.source ?? u.Manifest;
|
|
173
180
|
t.has(r) || (t.set(r, []), e.push(r)), t.get(r)?.push({
|
|
174
181
|
label: o.display_name,
|
|
175
182
|
value: o.tool_id,
|
|
176
|
-
leadingIcon:
|
|
183
|
+
leadingIcon: pe(X(o.source ?? u.Manifest)) ?? void 0
|
|
177
184
|
});
|
|
178
185
|
}), e.map((o) => ({
|
|
179
186
|
source: o,
|
|
180
|
-
label:
|
|
181
|
-
options: t.get(o) ?? []
|
|
187
|
+
label: Ye(o),
|
|
188
|
+
options: t.get(o) ?? [],
|
|
189
|
+
// Not connected → the source button opens the connect flow instead of
|
|
190
|
+
// its tool list (mirrors Step 3's tool section).
|
|
191
|
+
connected: A?.[o],
|
|
192
|
+
onConnect: () => R?.(o)
|
|
182
193
|
}));
|
|
183
|
-
})(),
|
|
184
|
-
if (!
|
|
194
|
+
})(), Ge = async () => {
|
|
195
|
+
if (!ae || te)
|
|
185
196
|
return;
|
|
186
|
-
const e =
|
|
187
|
-
name:
|
|
197
|
+
const e = f({
|
|
198
|
+
name: O.trim(),
|
|
188
199
|
instructions: T,
|
|
189
200
|
guardrail: C,
|
|
190
|
-
tools:
|
|
201
|
+
tools: D,
|
|
191
202
|
configTools: p,
|
|
192
203
|
restApiTools: m
|
|
193
204
|
});
|
|
194
205
|
if (e && typeof e.then == "function") {
|
|
195
|
-
|
|
206
|
+
oe(!0);
|
|
196
207
|
try {
|
|
197
208
|
await e;
|
|
198
209
|
} finally {
|
|
199
|
-
|
|
210
|
+
oe(!1);
|
|
200
211
|
}
|
|
201
212
|
}
|
|
202
|
-
},
|
|
203
|
-
if (!(!d ||
|
|
204
|
-
|
|
213
|
+
}, ce = async (e) => {
|
|
214
|
+
if (!(!d || v)) {
|
|
215
|
+
ne(e);
|
|
205
216
|
try {
|
|
206
217
|
const o = await d(e, e === "instructions" ? T : C);
|
|
207
|
-
e === "instructions" ? (
|
|
218
|
+
e === "instructions" ? (_(o), G((r) => r + 1)) : (w(o), B((r) => r + 1));
|
|
208
219
|
} finally {
|
|
209
|
-
|
|
220
|
+
ne(null);
|
|
210
221
|
}
|
|
211
222
|
}
|
|
212
223
|
};
|
|
213
|
-
return /* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
|
|
224
|
+
return /* @__PURE__ */ ue(Be, { children: [
|
|
225
|
+
/* @__PURE__ */ ue(
|
|
226
|
+
ot,
|
|
216
227
|
{
|
|
217
|
-
header:
|
|
228
|
+
header: V,
|
|
218
229
|
closeOnEscapeKey: !1,
|
|
219
|
-
zIndex:
|
|
230
|
+
zIndex: rt,
|
|
220
231
|
headerCustomComponent: /* @__PURE__ */ c(
|
|
221
|
-
|
|
232
|
+
Ve,
|
|
222
233
|
{
|
|
223
|
-
title:
|
|
234
|
+
title: V,
|
|
224
235
|
subtitle: "Each sub-agent handles one piece of the job. Use @ in the main instructions to call them."
|
|
225
236
|
}
|
|
226
237
|
),
|
|
227
238
|
width: "421px",
|
|
228
|
-
headerStyle:
|
|
229
|
-
bodyStyle:
|
|
239
|
+
headerStyle: Qe,
|
|
240
|
+
bodyStyle: Je,
|
|
230
241
|
onClose: x,
|
|
231
242
|
saveButtonProps: {
|
|
232
243
|
"data-test": "subagent-save",
|
|
233
244
|
buttonText: "Save",
|
|
234
245
|
buttonType: "primary",
|
|
235
246
|
size: "small",
|
|
236
|
-
disabled: !
|
|
237
|
-
isLoading:
|
|
238
|
-
onClick:
|
|
247
|
+
disabled: !ae,
|
|
248
|
+
isLoading: te,
|
|
249
|
+
onClick: Ge
|
|
239
250
|
},
|
|
240
251
|
cancelButtonProps: {
|
|
241
252
|
"data-test": "subagent-cancel",
|
|
@@ -246,131 +257,135 @@ const nt = 1e3, X = 1002, pe = (x, g) => {
|
|
|
246
257
|
},
|
|
247
258
|
children: [
|
|
248
259
|
/* @__PURE__ */ c(
|
|
249
|
-
|
|
260
|
+
nt,
|
|
250
261
|
{
|
|
251
262
|
"data-test": "subagent-name",
|
|
252
263
|
labelText: "Agent name",
|
|
253
264
|
labelTextBold: !0,
|
|
254
265
|
placeholder: "Enter agent name",
|
|
255
|
-
value:
|
|
266
|
+
value: O,
|
|
256
267
|
maxCharLimit: b.name,
|
|
257
268
|
maxCharLimitPosition: "TOP",
|
|
258
269
|
maxCharStyle: { fontSize: 12, lineHeight: "16px" },
|
|
259
|
-
state:
|
|
260
|
-
errorMessage:
|
|
261
|
-
onChangeText:
|
|
270
|
+
state: W ? "invalid" : void 0,
|
|
271
|
+
errorMessage: W ? "A sub-agent with this name already exists" : void 0,
|
|
272
|
+
onChangeText: be
|
|
262
273
|
}
|
|
263
274
|
),
|
|
264
275
|
/* @__PURE__ */ c(
|
|
265
|
-
|
|
276
|
+
fe,
|
|
266
277
|
{
|
|
267
278
|
"data-test": "subagent-instructions",
|
|
268
279
|
label: "Instructions",
|
|
269
280
|
value: T,
|
|
270
|
-
onChange:
|
|
281
|
+
onChange: _,
|
|
271
282
|
maxLength: b.instructions,
|
|
272
283
|
placeholder: "Write the steps in plain English. The agent will follow them exactly. The more specific you are, the better it performs.",
|
|
273
284
|
minHeight: "160px",
|
|
274
|
-
resetKey: `instr-${
|
|
275
|
-
mentionItems:
|
|
285
|
+
resetKey: `instr-${Te}`,
|
|
286
|
+
mentionItems: L,
|
|
276
287
|
tools: s,
|
|
277
|
-
toolActions:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
288
|
+
toolActions: q,
|
|
289
|
+
integrationStatus: A,
|
|
290
|
+
onConnectIntegration: R,
|
|
291
|
+
onMentionSelect: re,
|
|
292
|
+
onFocus: Se,
|
|
293
|
+
registerInsert: ve,
|
|
281
294
|
action: d ? /* @__PURE__ */ c(
|
|
282
|
-
|
|
295
|
+
he,
|
|
283
296
|
{
|
|
284
297
|
type: "button",
|
|
285
298
|
"data-test": "subagent-improve-instructions",
|
|
286
|
-
disabled:
|
|
287
|
-
onClick: () =>
|
|
288
|
-
children:
|
|
299
|
+
disabled: v !== null,
|
|
300
|
+
onClick: () => ce("instructions"),
|
|
301
|
+
children: v === "instructions" ? "Improving…" : "Improve with AI"
|
|
289
302
|
}
|
|
290
303
|
) : void 0
|
|
291
304
|
}
|
|
292
305
|
),
|
|
293
306
|
/* @__PURE__ */ c(
|
|
294
|
-
|
|
307
|
+
fe,
|
|
295
308
|
{
|
|
296
309
|
"data-test": "subagent-guardrail",
|
|
297
310
|
label: "Guardrails",
|
|
298
311
|
value: C,
|
|
299
|
-
onChange:
|
|
312
|
+
onChange: w,
|
|
300
313
|
maxLength: b.guardrail,
|
|
301
314
|
placeholder: "e.g. Never discuss competitor pricing. Always stay within the cancellation policy. Do not process refunds above ₹10,000 without human approval.",
|
|
302
315
|
minHeight: "160px",
|
|
303
|
-
resetKey: `guard-${
|
|
304
|
-
mentionItems:
|
|
316
|
+
resetKey: `guard-${Ce}`,
|
|
317
|
+
mentionItems: L,
|
|
305
318
|
tools: s,
|
|
306
|
-
toolActions:
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
319
|
+
toolActions: q,
|
|
320
|
+
integrationStatus: A,
|
|
321
|
+
onConnectIntegration: R,
|
|
322
|
+
onMentionSelect: re,
|
|
323
|
+
onFocus: xe,
|
|
324
|
+
registerInsert: Ie,
|
|
310
325
|
action: d ? /* @__PURE__ */ c(
|
|
311
|
-
|
|
326
|
+
he,
|
|
312
327
|
{
|
|
313
328
|
type: "button",
|
|
314
329
|
"data-test": "subagent-improve-guardrail",
|
|
315
|
-
disabled:
|
|
316
|
-
onClick: () =>
|
|
317
|
-
children:
|
|
330
|
+
disabled: v !== null,
|
|
331
|
+
onClick: () => ce("guardrail"),
|
|
332
|
+
children: v === "guardrail" ? "Improving…" : "Improve with AI"
|
|
318
333
|
}
|
|
319
334
|
) : void 0
|
|
320
335
|
}
|
|
321
336
|
),
|
|
322
337
|
/* @__PURE__ */ c(
|
|
323
|
-
|
|
338
|
+
tt,
|
|
324
339
|
{
|
|
325
340
|
title: "Tools this agent can use",
|
|
326
341
|
dataTestPrefix: "subagent-tools",
|
|
327
|
-
items:
|
|
328
|
-
addableOptions:
|
|
329
|
-
sourceGroups:
|
|
330
|
-
mentionItems:
|
|
331
|
-
actionSources:
|
|
342
|
+
items: De,
|
|
343
|
+
addableOptions: Ke,
|
|
344
|
+
sourceGroups: Ne,
|
|
345
|
+
mentionItems: L,
|
|
346
|
+
actionSources: q,
|
|
332
347
|
emptyText: "No tools added yet.",
|
|
333
348
|
pickerOpensUp: !0,
|
|
334
349
|
onAdd: (e) => {
|
|
335
|
-
|
|
350
|
+
I(e), k((t) => de(t, e));
|
|
336
351
|
},
|
|
337
|
-
onRemove:
|
|
338
|
-
confirmDelete: { noun: "tool", zIndex:
|
|
352
|
+
onRemove: we,
|
|
353
|
+
confirmDelete: { noun: "tool", zIndex: Z + 1 }
|
|
339
354
|
}
|
|
340
355
|
)
|
|
341
356
|
]
|
|
342
357
|
}
|
|
343
358
|
),
|
|
344
359
|
a?.kind === "restapi" && /* @__PURE__ */ c(
|
|
345
|
-
|
|
360
|
+
et,
|
|
346
361
|
{
|
|
347
362
|
initial: a.initialRest,
|
|
348
363
|
charLimits: b,
|
|
349
|
-
onImprove:
|
|
364
|
+
onImprove: J,
|
|
350
365
|
onClose: () => h(null),
|
|
351
|
-
onSave:
|
|
352
|
-
zIndex:
|
|
366
|
+
onSave: Re,
|
|
367
|
+
zIndex: Z
|
|
353
368
|
},
|
|
354
369
|
a.key
|
|
355
370
|
),
|
|
356
|
-
a?.kind === "config" && a.toolKey &&
|
|
357
|
-
|
|
371
|
+
a?.kind === "config" && a.toolKey && le && /* @__PURE__ */ c(
|
|
372
|
+
Ze,
|
|
358
373
|
{
|
|
359
374
|
toolKey: a.toolKey,
|
|
360
|
-
template:
|
|
375
|
+
template: le,
|
|
361
376
|
initial: a.initialConfig,
|
|
362
377
|
charLimits: b,
|
|
363
|
-
onImprove:
|
|
378
|
+
onImprove: J,
|
|
364
379
|
onClose: () => h(null),
|
|
365
|
-
onSave:
|
|
366
|
-
zIndex:
|
|
380
|
+
onSave: _e,
|
|
381
|
+
zIndex: Z
|
|
367
382
|
},
|
|
368
383
|
a.key
|
|
369
384
|
),
|
|
370
|
-
|
|
371
|
-
|
|
385
|
+
U && /* @__PURE__ */ c(
|
|
386
|
+
st,
|
|
372
387
|
{
|
|
373
|
-
text:
|
|
388
|
+
text: U.message,
|
|
374
389
|
type: "info",
|
|
375
390
|
position: "top-right",
|
|
376
391
|
autoClose: 5e3,
|
|
@@ -378,15 +393,15 @@ const nt = 1e3, X = 1002, pe = (x, g) => {
|
|
|
378
393
|
buttonProps: {
|
|
379
394
|
buttonText: "Undo",
|
|
380
395
|
showButton: !0,
|
|
381
|
-
onButtonClick: () => (
|
|
396
|
+
onButtonClick: () => (ke(), {})
|
|
382
397
|
},
|
|
383
|
-
onCloseToast: () =>
|
|
398
|
+
onCloseToast: () => $(null)
|
|
384
399
|
},
|
|
385
|
-
|
|
400
|
+
U.id
|
|
386
401
|
)
|
|
387
402
|
] });
|
|
388
403
|
};
|
|
389
404
|
export {
|
|
390
|
-
|
|
405
|
+
xt as CreateSubAgentPanel
|
|
391
406
|
};
|
|
392
407
|
//# sourceMappingURL=CreateSubAgentPanel.js.map
|