@bikdotai/bik-component-library 0.0.831-beta.1 → 0.0.831-beta.3
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/components/ConfigToolPanel.js +6 -6
- package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +2 -2
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/DrawerHeaderText.js +3 -3
- package/dist/cjs/components/agent-builder/components/DrawerHeaderText.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 +19 -19
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js +4 -4
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +4 -4
- package/dist/cjs/components/agent-builder/components/SelectableListSection.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-builder/utils/toolActions.js +2 -0
- package/dist/cjs/components/agent-builder/utils/toolActions.js.map +1 -0
- package/dist/cjs/components/states-modal/DeleteConfirmationModal.js +1 -1
- package/dist/cjs/components/states-modal/DeleteConfirmationModal.js.map +1 -1
- package/dist/cjs/icons/Media/Visual/{FormkitNeutral.js → Frame26086263.js} +1 -1
- package/dist/cjs/icons/Media/Visual/Frame26086263.js.map +1 -0
- package/dist/cjs/icons/Media/Visual/{FormkitSad.js → IconTrailing.js} +1 -1
- package/dist/cjs/icons/Media/Visual/IconTrailing.js.map +1 -0
- package/dist/cjs/icons/Social/Social/SlackIcon.js +2 -0
- package/dist/cjs/icons/Social/Social/SlackIcon.js.map +1 -0
- package/dist/cjs/icons/index.js +1 -1
- package/dist/esm/components/agent-builder/components/ConfigToolPanel.js +92 -101
- package/dist/esm/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +149 -154
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/DrawerHeaderText.d.ts +2 -9
- package/dist/esm/components/agent-builder/components/DrawerHeaderText.js +15 -19
- package/dist/esm/components/agent-builder/components/DrawerHeaderText.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionField.js +57 -66
- package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.js +66 -55
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js +77 -80
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +10 -0
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +134 -118
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +144 -148
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/sourceIcons.js +14 -14
- package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/toolActions.d.ts +11 -0
- package/dist/esm/components/agent-builder/utils/toolActions.js +15 -0
- package/dist/esm/components/agent-builder/utils/toolActions.js.map +1 -0
- package/dist/esm/components/states-modal/DeleteConfirmationModal.d.ts +2 -0
- package/dist/esm/components/states-modal/DeleteConfirmationModal.js +11 -10
- package/dist/esm/components/states-modal/DeleteConfirmationModal.js.map +1 -1
- package/dist/esm/icons/Media/Visual/Frame26086263.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/{FormkitNeutral.js → Frame26086263.js} +1 -1
- package/dist/esm/icons/Media/Visual/Frame26086263.js.map +1 -0
- package/dist/esm/icons/Media/Visual/IconTrailing.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/{FormkitSad.js → IconTrailing.js} +1 -1
- package/dist/esm/icons/Media/Visual/IconTrailing.js.map +1 -0
- package/dist/esm/icons/Media/Visual/index.d.ts +2 -2
- package/dist/esm/icons/Social/Social/SlackIcon.d.ts +7 -0
- package/dist/esm/icons/Social/Social/SlackIcon.js +47 -0
- package/dist/esm/icons/Social/Social/SlackIcon.js.map +1 -0
- package/dist/esm/icons/Social/Social/index.d.ts +1 -0
- package/dist/esm/icons/index.d.ts +25 -25
- package/dist/esm/icons/index.js +246 -244
- package/dist/esm/icons/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/icons/Media/Visual/FormkitNeutral.js.map +0 -1
- package/dist/cjs/icons/Media/Visual/FormkitSad.js.map +0 -1
- package/dist/esm/icons/Media/Visual/FormkitNeutral.js.map +0 -1
- package/dist/esm/icons/Media/Visual/FormkitSad.js.map +0 -1
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsxs as rt, Fragment as
|
|
2
|
-
import { useState as r, useRef as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as rt, Fragment as Ot, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as r, useRef as v, useMemo as wt, useCallback as a } from "react";
|
|
3
|
+
import Kt from "styled-components";
|
|
4
4
|
import { addUnique as it } from "../../../utils/arrayUtils.js";
|
|
5
5
|
import { COLORS as F } from "../../../constants/Theme.js";
|
|
6
|
-
import { AGENT_CHAR_LIMITS as
|
|
7
|
-
import { CONFIG_TOOL_SOURCES as
|
|
8
|
-
import { buildAgentMentionItems as
|
|
9
|
-
import { sourceIcon as j, SOURCE_ICONS as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import { AGENT_CHAR_LIMITS as Nt } from "../constants/charLimits.js";
|
|
7
|
+
import { CONFIG_TOOL_SOURCES as Dt, ToolSource as p } from "../constants/tools.js";
|
|
8
|
+
import { buildAgentMentionItems as Gt, buildCustomToolMentionItems as Bt, restApiMentionItem as Pt, configToolMentionItem as zt, restApiToolName as Lt, configToolName as Ht, toolSourceLabel as Ut } from "../utils/mentionSerialization.js";
|
|
9
|
+
import { sourceIcon as j, SOURCE_ICONS as lt, renderSourceIcon as at } from "../utils/sourceIcons.js";
|
|
10
|
+
import { buildToolActions as $t } from "../utils/toolActions.js";
|
|
11
|
+
import { ConfigToolPanel as Ft } from "./ConfigToolPanel.js";
|
|
12
|
+
import { DRAWER_BODY_STYLE as jt, DRAWER_HEADER_STYLE as Wt, DrawerHeaderText as Yt } from "./DrawerHeaderText.js";
|
|
12
13
|
import { MentionEditor as ct } from "./MentionEditor.js";
|
|
13
|
-
import { RestApiToolPanel as
|
|
14
|
-
import { SelectableListSection as
|
|
15
|
-
import { SideModal as
|
|
16
|
-
import { Input as
|
|
17
|
-
import { Toaster as
|
|
18
|
-
const
|
|
19
|
-
const s =
|
|
14
|
+
import { RestApiToolPanel as Xt } from "./RestApiToolPanel.js";
|
|
15
|
+
import { SelectableListSection as Zt } from "./SelectableListSection.js";
|
|
16
|
+
import { SideModal as qt } from "../../side-modal/SideModal.js";
|
|
17
|
+
import { Input as Jt } from "../../input/Input.js";
|
|
18
|
+
import { Toaster as Qt } from "../../toaster/Toaster.js";
|
|
19
|
+
const Vt = 1e3, W = 1002, ut = (x, f) => {
|
|
20
|
+
const s = x ?? [];
|
|
20
21
|
return s.some((u) => u.id === f.id) ? s.map((u) => u.id === f.id ? f : u) : [...s, f];
|
|
21
|
-
},
|
|
22
|
+
}, dt = Kt.button`
|
|
22
23
|
align-self: flex-start;
|
|
23
24
|
border: 1px solid ${F.stroke.primary};
|
|
24
25
|
color: ${F.content.primary};
|
|
@@ -34,8 +35,8 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
|
|
|
34
35
|
cursor: default;
|
|
35
36
|
opacity: 0.6;
|
|
36
37
|
}
|
|
37
|
-
`,
|
|
38
|
-
onClose:
|
|
38
|
+
`, To = ({
|
|
39
|
+
onClose: x,
|
|
39
40
|
onSave: f,
|
|
40
41
|
availableTools: s,
|
|
41
42
|
onImprove: u,
|
|
@@ -44,138 +45,131 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
|
|
|
44
45
|
title: Z = "Create sub-agent",
|
|
45
46
|
initial: g,
|
|
46
47
|
appLabel: q = "Manifest",
|
|
47
|
-
charLimits: h =
|
|
48
|
+
charLimits: h = Nt
|
|
48
49
|
}) => {
|
|
49
|
-
const [
|
|
50
|
+
const [M, mt] = r(g?.name ?? ""), [b, A] = r(g?.instructions ?? ""), [T, R] = r(g?.guardrail ?? ""), [O, _] = r(g?.tools ?? []), [m, w] = r(
|
|
50
51
|
g?.configTools ?? []
|
|
51
|
-
), [d,
|
|
52
|
+
), [d, K] = r(
|
|
52
53
|
g?.restApiTools ?? []
|
|
53
|
-
), [i, y] = r(null),
|
|
54
|
+
), [i, y] = r(null), E = v(0), [J, Q] = r(!1), [pt, N] = r(0), [ft, D] = r(0), [I, V] = r(null), G = wt(
|
|
54
55
|
() => [
|
|
55
|
-
...
|
|
56
|
-
...
|
|
56
|
+
...Gt(s, [], q),
|
|
57
|
+
...Bt(m, d)
|
|
57
58
|
],
|
|
58
59
|
[s, q, m, d]
|
|
59
|
-
),
|
|
60
|
-
|
|
61
|
-
}, []),
|
|
62
|
-
|
|
63
|
-
}, []),
|
|
64
|
-
|
|
60
|
+
), k = v({}), B = v("instructions"), gt = a((t) => {
|
|
61
|
+
k.current.instructions = t ?? void 0;
|
|
62
|
+
}, []), yt = a((t) => {
|
|
63
|
+
k.current.guardrail = t ?? void 0;
|
|
64
|
+
}, []), ht = a(() => {
|
|
65
|
+
B.current = "instructions";
|
|
65
66
|
}, []), bt = a(() => {
|
|
66
|
-
|
|
67
|
+
B.current = "guardrail";
|
|
67
68
|
}, []), tt = a(
|
|
68
|
-
(t,
|
|
69
|
-
t === "tool" &&
|
|
69
|
+
(t, o) => {
|
|
70
|
+
t === "tool" && _((e) => it(e, o));
|
|
70
71
|
},
|
|
71
72
|
[]
|
|
72
|
-
), C = a((t,
|
|
73
|
-
(
|
|
74
|
-
}, []),
|
|
75
|
-
|
|
76
|
-
key:
|
|
73
|
+
), C = a((t, o) => {
|
|
74
|
+
(k.current[B.current] ?? k.current.instructions)?.("tool", t, o);
|
|
75
|
+
}, []), P = a((t) => {
|
|
76
|
+
E.current += 1, y({
|
|
77
|
+
key: E.current,
|
|
77
78
|
kind: "restapi",
|
|
78
79
|
initialRest: t
|
|
79
80
|
});
|
|
80
|
-
}, []),
|
|
81
|
-
(t,
|
|
82
|
-
|
|
83
|
-
key:
|
|
81
|
+
}, []), z = a(
|
|
82
|
+
(t, o) => {
|
|
83
|
+
E.current += 1, y({
|
|
84
|
+
key: E.current,
|
|
84
85
|
kind: "config",
|
|
85
86
|
toolKey: t,
|
|
86
|
-
initialConfig:
|
|
87
|
+
initialConfig: o
|
|
87
88
|
});
|
|
88
89
|
},
|
|
89
90
|
[]
|
|
90
|
-
),
|
|
91
|
+
), Tt = a(
|
|
91
92
|
(t) => {
|
|
92
|
-
const
|
|
93
|
-
|
|
93
|
+
const o = Dt[t];
|
|
94
|
+
o ? z(o) : P();
|
|
94
95
|
},
|
|
95
|
-
[
|
|
96
|
-
),
|
|
96
|
+
[z, P]
|
|
97
|
+
), It = a(
|
|
97
98
|
(t) => {
|
|
98
|
-
const
|
|
99
|
-
|
|
99
|
+
const o = !d.some((e) => e.id === t.id);
|
|
100
|
+
K((e) => ut(e, t)), o && C(t.id, Pt(t).label), y(null);
|
|
100
101
|
},
|
|
101
102
|
[d, C]
|
|
102
|
-
),
|
|
103
|
+
), Ct = a(
|
|
103
104
|
(t) => {
|
|
104
|
-
const
|
|
105
|
-
|
|
105
|
+
const o = !m.some((e) => e.id === t.id);
|
|
106
|
+
w((e) => ut(e, t)), o && C(t.id, zt(t).label), y(null);
|
|
106
107
|
},
|
|
107
108
|
[m, C]
|
|
108
|
-
), [
|
|
109
|
+
), [L, H] = r(
|
|
109
110
|
null
|
|
110
|
-
),
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
instructions:
|
|
114
|
-
guardrail:
|
|
115
|
-
tools:
|
|
111
|
+
), U = v(null), ot = v(0), St = (t) => {
|
|
112
|
+
const o = s.find((n) => n.tool_id === t)?.display_name ?? d.find((n) => n.id === t)?.name ?? "Tool", e = `{{tool:${t}}}`, l = (n) => n.split(e).join("");
|
|
113
|
+
U.current = {
|
|
114
|
+
instructions: b,
|
|
115
|
+
guardrail: T,
|
|
116
|
+
tools: O,
|
|
116
117
|
configTools: m,
|
|
117
118
|
restApiTools: d
|
|
118
|
-
},
|
|
119
|
+
}, A((n) => l(n)), R((n) => l(n)), _((n) => n.filter((S) => S !== t)), w((n) => n.filter((S) => S.id !== t)), K((n) => n.filter((S) => S.id !== t)), N((n) => n + 1), D((n) => n + 1), ot.current += 1, H({ id: ot.current, message: `Tool "${o}" removed` });
|
|
119
120
|
}, vt = () => {
|
|
120
|
-
const t =
|
|
121
|
-
t && (
|
|
122
|
-
},
|
|
123
|
-
const
|
|
124
|
-
return
|
|
121
|
+
const t = U.current;
|
|
122
|
+
t && (A(t.instructions), R(t.guardrail), _(t.tools), w(t.configTools), K(t.restApiTools), N((o) => o + 1), D((o) => o + 1), U.current = null), H(null);
|
|
123
|
+
}, et = M.trim().length > 0 && (b.trim().length > 0 || T.trim().length > 0), xt = O.map((t) => {
|
|
124
|
+
const o = s.find((e) => e.tool_id === t);
|
|
125
|
+
return o ? {
|
|
125
126
|
id: t,
|
|
126
|
-
label:
|
|
127
|
-
icon: j(
|
|
127
|
+
label: o.display_name,
|
|
128
|
+
icon: j(o.source ?? p.Manifest)
|
|
128
129
|
} : null;
|
|
129
|
-
}).filter((t) => t !== null),
|
|
130
|
+
}).filter((t) => t !== null), At = d.map((t) => ({
|
|
130
131
|
id: t.id,
|
|
131
|
-
label:
|
|
132
|
-
icon:
|
|
133
|
-
onConfigure: () =>
|
|
132
|
+
label: Lt(t),
|
|
133
|
+
icon: lt[p.RestApi],
|
|
134
|
+
onConfigure: () => P(t)
|
|
134
135
|
})), Rt = m.map((t) => ({
|
|
135
136
|
id: t.id,
|
|
136
|
-
label:
|
|
137
|
-
icon:
|
|
138
|
-
onConfigure: () =>
|
|
139
|
-
})),
|
|
137
|
+
label: Ht(t),
|
|
138
|
+
icon: lt[t.tool_key === "send_slack_message" ? p.Slack : p.EmailHandover],
|
|
139
|
+
onConfigure: () => z(t.tool_key, t)
|
|
140
|
+
})), _t = [
|
|
140
141
|
...xt,
|
|
141
|
-
...
|
|
142
|
+
...At,
|
|
142
143
|
...Rt
|
|
143
|
-
], $ =
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
).map((t) => ({
|
|
149
|
-
source: t,
|
|
150
|
-
label: Dt[t] ?? Gt[t],
|
|
151
|
-
icon: W[t],
|
|
152
|
-
onSelect: () => St(t)
|
|
153
|
-
})), nt = i?.kind === "config" && i.toolKey ? X?.[i.toolKey] : void 0, Et = s.map((t) => ({
|
|
144
|
+
], $ = $t(
|
|
145
|
+
X,
|
|
146
|
+
Tt
|
|
147
|
+
), nt = i?.kind === "config" && i.toolKey ? X?.[i.toolKey] : void 0, Et = s.map((t) => ({
|
|
154
148
|
label: t.display_name,
|
|
155
149
|
value: t.tool_id,
|
|
156
150
|
leadingIcon: at(j(t.source ?? p.Manifest)) ?? void 0
|
|
157
151
|
})), kt = (() => {
|
|
158
|
-
const t = [],
|
|
159
|
-
return s.forEach((
|
|
160
|
-
const l =
|
|
161
|
-
|
|
162
|
-
label:
|
|
163
|
-
value:
|
|
164
|
-
leadingIcon: at(j(
|
|
152
|
+
const t = [], o = /* @__PURE__ */ new Map();
|
|
153
|
+
return s.forEach((e) => {
|
|
154
|
+
const l = e.source ?? p.Manifest;
|
|
155
|
+
o.has(l) || (o.set(l, []), t.push(l)), o.get(l)?.push({
|
|
156
|
+
label: e.display_name,
|
|
157
|
+
value: e.tool_id,
|
|
158
|
+
leadingIcon: at(j(e.source ?? p.Manifest)) ?? void 0
|
|
165
159
|
});
|
|
166
|
-
}), t.map((
|
|
167
|
-
source:
|
|
168
|
-
label:
|
|
169
|
-
options:
|
|
160
|
+
}), t.map((e) => ({
|
|
161
|
+
source: e,
|
|
162
|
+
label: Ut(e),
|
|
163
|
+
options: o.get(e) ?? []
|
|
170
164
|
}));
|
|
171
165
|
})(), Mt = async () => {
|
|
172
|
-
if (!
|
|
166
|
+
if (!et || J)
|
|
173
167
|
return;
|
|
174
168
|
const t = f({
|
|
175
|
-
name:
|
|
176
|
-
instructions:
|
|
177
|
-
guardrail:
|
|
178
|
-
tools:
|
|
169
|
+
name: M.trim(),
|
|
170
|
+
instructions: b,
|
|
171
|
+
guardrail: T,
|
|
172
|
+
tools: O,
|
|
179
173
|
configTools: m,
|
|
180
174
|
restApiTools: d
|
|
181
175
|
});
|
|
@@ -188,40 +182,40 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
|
|
|
188
182
|
}
|
|
189
183
|
}
|
|
190
184
|
}, st = async (t) => {
|
|
191
|
-
if (!(!u ||
|
|
185
|
+
if (!(!u || I)) {
|
|
192
186
|
V(t);
|
|
193
187
|
try {
|
|
194
|
-
const
|
|
195
|
-
t === "instructions" ? (
|
|
188
|
+
const e = await u(t, t === "instructions" ? b : T);
|
|
189
|
+
t === "instructions" ? (A(e), N((l) => l + 1)) : (R(e), D((l) => l + 1));
|
|
196
190
|
} finally {
|
|
197
191
|
V(null);
|
|
198
192
|
}
|
|
199
193
|
}
|
|
200
194
|
};
|
|
201
|
-
return /* @__PURE__ */ rt(
|
|
195
|
+
return /* @__PURE__ */ rt(Ot, { children: [
|
|
202
196
|
/* @__PURE__ */ rt(
|
|
203
|
-
|
|
197
|
+
qt,
|
|
204
198
|
{
|
|
205
199
|
header: Z,
|
|
206
200
|
closeOnEscapeKey: !1,
|
|
207
|
-
zIndex:
|
|
201
|
+
zIndex: Vt,
|
|
208
202
|
headerCustomComponent: /* @__PURE__ */ c(
|
|
209
|
-
|
|
203
|
+
Yt,
|
|
210
204
|
{
|
|
211
205
|
title: Z,
|
|
212
206
|
subtitle: "Each sub-agent handles one piece of the job. Use @ in the main instructions to call them."
|
|
213
207
|
}
|
|
214
208
|
),
|
|
215
209
|
width: "421px",
|
|
216
|
-
headerStyle:
|
|
217
|
-
bodyStyle:
|
|
218
|
-
onClose:
|
|
210
|
+
headerStyle: Wt,
|
|
211
|
+
bodyStyle: jt,
|
|
212
|
+
onClose: x,
|
|
219
213
|
saveButtonProps: {
|
|
220
214
|
"data-test": "subagent-save",
|
|
221
215
|
buttonText: "Save",
|
|
222
216
|
buttonType: "primary",
|
|
223
217
|
size: "small",
|
|
224
|
-
disabled: !
|
|
218
|
+
disabled: !et,
|
|
225
219
|
isLoading: J,
|
|
226
220
|
onClick: Mt
|
|
227
221
|
},
|
|
@@ -230,21 +224,21 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
|
|
|
230
224
|
buttonText: "Cancel",
|
|
231
225
|
buttonType: "tertiaryGray",
|
|
232
226
|
size: "small",
|
|
233
|
-
onClick:
|
|
227
|
+
onClick: x
|
|
234
228
|
},
|
|
235
229
|
children: [
|
|
236
230
|
/* @__PURE__ */ c(
|
|
237
|
-
|
|
231
|
+
Jt,
|
|
238
232
|
{
|
|
239
233
|
"data-test": "subagent-name",
|
|
240
234
|
labelText: "Agent name",
|
|
241
235
|
labelTextBold: !0,
|
|
242
236
|
placeholder: "Enter agent name",
|
|
243
|
-
value:
|
|
237
|
+
value: M,
|
|
244
238
|
maxCharLimit: h.name,
|
|
245
239
|
maxCharLimitPosition: "TOP",
|
|
246
240
|
maxCharStyle: { fontSize: 12, lineHeight: "16px" },
|
|
247
|
-
onChangeText:
|
|
241
|
+
onChangeText: mt
|
|
248
242
|
}
|
|
249
243
|
),
|
|
250
244
|
/* @__PURE__ */ c(
|
|
@@ -252,26 +246,26 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
|
|
|
252
246
|
{
|
|
253
247
|
"data-test": "subagent-instructions",
|
|
254
248
|
label: "Instructions",
|
|
255
|
-
value:
|
|
256
|
-
onChange:
|
|
249
|
+
value: b,
|
|
250
|
+
onChange: A,
|
|
257
251
|
maxLength: h.instructions,
|
|
258
252
|
placeholder: "Write the steps in plain English. Type @ to reference a tool.",
|
|
259
253
|
minHeight: "160px",
|
|
260
|
-
resetKey: `instr-${
|
|
261
|
-
mentionItems:
|
|
254
|
+
resetKey: `instr-${pt}`,
|
|
255
|
+
mentionItems: G,
|
|
262
256
|
tools: s,
|
|
263
257
|
toolActions: $,
|
|
264
258
|
onMentionSelect: tt,
|
|
265
|
-
onFocus:
|
|
266
|
-
registerInsert:
|
|
259
|
+
onFocus: ht,
|
|
260
|
+
registerInsert: gt,
|
|
267
261
|
action: u ? /* @__PURE__ */ c(
|
|
268
|
-
|
|
262
|
+
dt,
|
|
269
263
|
{
|
|
270
264
|
type: "button",
|
|
271
265
|
"data-test": "subagent-improve-instructions",
|
|
272
|
-
disabled:
|
|
266
|
+
disabled: I !== null,
|
|
273
267
|
onClick: () => st("instructions"),
|
|
274
|
-
children:
|
|
268
|
+
children: I === "instructions" ? "Improving…" : "Improve with AI"
|
|
275
269
|
}
|
|
276
270
|
) : void 0
|
|
277
271
|
}
|
|
@@ -281,64 +275,65 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
|
|
|
281
275
|
{
|
|
282
276
|
"data-test": "subagent-guardrail",
|
|
283
277
|
label: "Guardrails",
|
|
284
|
-
value:
|
|
285
|
-
onChange:
|
|
278
|
+
value: T,
|
|
279
|
+
onChange: R,
|
|
286
280
|
maxLength: h.guardrail,
|
|
287
281
|
placeholder: "e.g. Never discuss competitor pricing. Type @ to reference a tool.",
|
|
288
282
|
minHeight: "160px",
|
|
289
|
-
resetKey: `guard-${
|
|
290
|
-
mentionItems:
|
|
283
|
+
resetKey: `guard-${ft}`,
|
|
284
|
+
mentionItems: G,
|
|
291
285
|
tools: s,
|
|
292
286
|
toolActions: $,
|
|
293
287
|
onMentionSelect: tt,
|
|
294
288
|
onFocus: bt,
|
|
295
|
-
registerInsert:
|
|
289
|
+
registerInsert: yt,
|
|
296
290
|
action: u ? /* @__PURE__ */ c(
|
|
297
|
-
|
|
291
|
+
dt,
|
|
298
292
|
{
|
|
299
293
|
type: "button",
|
|
300
294
|
"data-test": "subagent-improve-guardrail",
|
|
301
|
-
disabled:
|
|
295
|
+
disabled: I !== null,
|
|
302
296
|
onClick: () => st("guardrail"),
|
|
303
|
-
children:
|
|
297
|
+
children: I === "guardrail" ? "Improving…" : "Improve with AI"
|
|
304
298
|
}
|
|
305
299
|
) : void 0
|
|
306
300
|
}
|
|
307
301
|
),
|
|
308
302
|
/* @__PURE__ */ c(
|
|
309
|
-
|
|
303
|
+
Zt,
|
|
310
304
|
{
|
|
311
305
|
title: "Tools this agent can use",
|
|
312
306
|
dataTestPrefix: "subagent-tools",
|
|
313
|
-
items:
|
|
307
|
+
items: _t,
|
|
314
308
|
addableOptions: Et,
|
|
315
309
|
sourceGroups: kt,
|
|
316
|
-
mentionItems:
|
|
310
|
+
mentionItems: G,
|
|
317
311
|
actionSources: $,
|
|
318
312
|
emptyText: "No tools added yet.",
|
|
319
313
|
onAdd: (t) => {
|
|
320
|
-
C(t),
|
|
314
|
+
C(t), _((o) => it(o, t));
|
|
321
315
|
},
|
|
322
|
-
onRemove:
|
|
316
|
+
onRemove: St,
|
|
317
|
+
confirmDelete: { noun: "tool", zIndex: W + 1 }
|
|
323
318
|
}
|
|
324
319
|
)
|
|
325
320
|
]
|
|
326
321
|
}
|
|
327
322
|
),
|
|
328
323
|
i?.kind === "restapi" && /* @__PURE__ */ c(
|
|
329
|
-
|
|
324
|
+
Xt,
|
|
330
325
|
{
|
|
331
326
|
initial: i.initialRest,
|
|
332
327
|
charLimits: h,
|
|
333
328
|
onImprove: Y,
|
|
334
329
|
onClose: () => y(null),
|
|
335
|
-
onSave:
|
|
336
|
-
zIndex:
|
|
330
|
+
onSave: It,
|
|
331
|
+
zIndex: W
|
|
337
332
|
},
|
|
338
333
|
i.key
|
|
339
334
|
),
|
|
340
335
|
i?.kind === "config" && i.toolKey && nt && /* @__PURE__ */ c(
|
|
341
|
-
|
|
336
|
+
Ft,
|
|
342
337
|
{
|
|
343
338
|
toolKey: i.toolKey,
|
|
344
339
|
template: nt,
|
|
@@ -346,15 +341,15 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
|
|
|
346
341
|
charLimits: h,
|
|
347
342
|
onImprove: Y,
|
|
348
343
|
onClose: () => y(null),
|
|
349
|
-
onSave:
|
|
350
|
-
zIndex:
|
|
344
|
+
onSave: Ct,
|
|
345
|
+
zIndex: W
|
|
351
346
|
},
|
|
352
347
|
i.key
|
|
353
348
|
),
|
|
354
|
-
|
|
355
|
-
|
|
349
|
+
L && /* @__PURE__ */ c(
|
|
350
|
+
Qt,
|
|
356
351
|
{
|
|
357
|
-
text:
|
|
352
|
+
text: L.message,
|
|
358
353
|
type: "info",
|
|
359
354
|
position: "top-right",
|
|
360
355
|
autoClose: 5e3,
|
|
@@ -364,13 +359,13 @@ const ee = 1e3, ut = 1002, dt = (v, f) => {
|
|
|
364
359
|
showButton: !0,
|
|
365
360
|
onButtonClick: () => (vt(), {})
|
|
366
361
|
},
|
|
367
|
-
onCloseToast: () =>
|
|
362
|
+
onCloseToast: () => H(null)
|
|
368
363
|
},
|
|
369
|
-
|
|
364
|
+
L.id
|
|
370
365
|
)
|
|
371
366
|
] });
|
|
372
367
|
};
|
|
373
368
|
export {
|
|
374
|
-
|
|
369
|
+
To as CreateSubAgentPanel
|
|
375
370
|
};
|
|
376
371
|
//# sourceMappingURL=CreateSubAgentPanel.js.map
|