@bikdotai/bik-component-library 0.0.849-beta.2 → 0.0.849
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 +28 -16
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.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/MentionEditor.js +1 -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 +11 -11
- 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/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/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/agent-listing/AgentTableRow.js +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/cjs/editor/BikEditor.styles.js +0 -6
- package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
- package/dist/cjs/icons/Informational/Common UI/ShieldOutline.js +2 -0
- package/dist/cjs/icons/Informational/Common UI/ShieldOutline.js.map +1 -0
- package/dist/cjs/icons/index.js +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.js +69 -71
- package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +0 -8
- package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +3 -0
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js +46 -33
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.d.ts +0 -3
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +110 -113
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionEditor.d.ts +0 -7
- package/dist/esm/components/agent-builder/components/MentionEditor.js +74 -89
- package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionField.js +26 -28
- package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +1 -14
- package/dist/esm/components/agent-builder/components/MentionPicker.js +138 -167
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/RequireVerificationModal.js +5 -5
- package/dist/esm/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +72 -63
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/constants/tools.d.ts +1 -1
- package/dist/esm/components/agent-builder/constants/tools.js +5 -6
- package/dist/esm/components/agent-builder/constants/tools.js.map +1 -1
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +0 -7
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +96 -99
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +174 -165
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +4 -14
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js +38 -50
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentTableRow.js +1 -1
- package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/esm/editor/BikEditor.styles.js +0 -6
- package/dist/esm/editor/BikEditor.styles.js.map +1 -1
- package/dist/esm/icons/Informational/Common UI/ShieldOutline.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/ShieldOutline.js +35 -0
- package/dist/esm/icons/Informational/Common UI/ShieldOutline.js.map +1 -0
- package/dist/esm/icons/Informational/Common UI/index.d.ts +1 -0
- package/dist/esm/icons/index.d.ts +25 -25
- package/dist/esm/icons/index.js +172 -170
- package/dist/esm/icons/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,200 +1,186 @@
|
|
|
1
|
-
import { jsxs as b, jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useState as
|
|
1
|
+
import { jsxs as b, jsx as s, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import H from "../../../assets/icons/chevronRight.svg.js";
|
|
3
|
+
import ee from "../../../assets/icons/searchIcon.svg.js";
|
|
4
|
+
import te from "../../../icons/Arrows/Normal arrows/ArrowLeft.js";
|
|
5
|
+
import { useState as E, useMemo as k, useEffect as D, useRef as ne } from "react";
|
|
6
6
|
import p from "styled-components";
|
|
7
|
-
import { TitleSmall as
|
|
7
|
+
import { TitleSmall as re, BodySecondary as oe, BodyCaption as ie } from "../../TypographyStyle.js";
|
|
8
8
|
import { COLORS as i } from "../../../constants/Theme.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
registerKeyHandler: S,
|
|
19
|
-
onClose: x,
|
|
9
|
+
import { CATEGORIES as ae, toolSourceRank as Q, CONFIG_TOOL_SOURCES as le } from "../constants/tools.js";
|
|
10
|
+
import { toolSourceLabel as M } from "../utils/mentionSerialization.js";
|
|
11
|
+
import { sourceIcon as T, renderSourceIcon as V } from "../utils/sourceIcons.js";
|
|
12
|
+
import W from "../../../icons/Informational/Common UI/Shield.js";
|
|
13
|
+
const f = (l) => l.meta, I = (l) => f(l)?.plainLabel ?? l.label, ce = "__bik_create_subagent__", Te = ({
|
|
14
|
+
items: l,
|
|
15
|
+
onSelect: S,
|
|
16
|
+
registerKeyHandler: R,
|
|
17
|
+
onClose: v,
|
|
20
18
|
onCreateSubAgent: y,
|
|
21
|
-
initialSource:
|
|
22
|
-
toolActions:
|
|
23
|
-
integrationStatus:
|
|
24
|
-
onConnectIntegration:
|
|
25
|
-
variablesData: _,
|
|
26
|
-
onSelectVariable: O
|
|
19
|
+
initialSource: N,
|
|
20
|
+
toolActions: x,
|
|
21
|
+
integrationStatus: U,
|
|
22
|
+
onConnectIntegration: j
|
|
27
23
|
}) => {
|
|
28
|
-
const [
|
|
29
|
-
() =>
|
|
30
|
-
[
|
|
31
|
-
), $ =
|
|
32
|
-
() =>
|
|
33
|
-
[
|
|
34
|
-
),
|
|
24
|
+
const [X, q] = E(null), [c, _] = E(N ?? null), [C, g] = E(-1), [w, F] = E(""), m = k(
|
|
25
|
+
() => l.filter((e) => f(e)?.kind === "tool"),
|
|
26
|
+
[l]
|
|
27
|
+
), $ = k(
|
|
28
|
+
() => l.filter((e) => f(e)?.kind === "subagent"),
|
|
29
|
+
[l]
|
|
30
|
+
), O = k(() => {
|
|
35
31
|
const e = [];
|
|
36
32
|
return m.forEach((r) => {
|
|
37
|
-
const
|
|
38
|
-
e.includes(
|
|
33
|
+
const h = f(r)?.source ?? "other";
|
|
34
|
+
e.includes(h) || e.push(h);
|
|
39
35
|
}), e;
|
|
40
|
-
}, [m]),
|
|
36
|
+
}, [m]), P = k(
|
|
41
37
|
() => new Map(
|
|
42
|
-
(
|
|
38
|
+
(x ?? []).map((e) => [e.source, e])
|
|
43
39
|
),
|
|
44
|
-
[
|
|
45
|
-
), A =
|
|
46
|
-
() =>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
k?.length,
|
|
52
|
-
_?.length,
|
|
53
|
-
O
|
|
54
|
-
]
|
|
55
|
-
), L = A.length === 1 ? A[0].key : null, a = Z ?? L, u = a ? a === "subagent" ? (
|
|
40
|
+
[x]
|
|
41
|
+
), A = k(
|
|
42
|
+
() => ae.filter(
|
|
43
|
+
(e) => e.key === "tool" ? m.length > 0 || (x?.length ?? 0) > 0 : $.length > 0 || !!y
|
|
44
|
+
),
|
|
45
|
+
[m.length, $.length, y, x?.length]
|
|
46
|
+
), z = A.length === 1 ? A[0].key : null, d = X ?? z, u = d ? d === "subagent" ? (
|
|
56
47
|
// Always titled — with a back arrow only when the category chooser is above.
|
|
57
48
|
{
|
|
58
49
|
title: "Sub-agent",
|
|
59
|
-
onBack:
|
|
50
|
+
onBack: z ? void 0 : () => q(null)
|
|
60
51
|
}
|
|
61
|
-
) :
|
|
62
|
-
title:
|
|
63
|
-
onBack: L ? void 0 : () => C(null)
|
|
64
|
-
} : d ? {
|
|
65
|
-
title: U(d),
|
|
52
|
+
) : c ? {
|
|
53
|
+
title: M(c),
|
|
66
54
|
// Deep-linked to a source (opened from a right-panel source button):
|
|
67
55
|
// that source IS the root, so no back arrow. In the @-drill flow
|
|
68
56
|
// (no initialSource) back returns to the source chooser.
|
|
69
|
-
onBack:
|
|
70
|
-
icon: T(
|
|
57
|
+
onBack: N ? void 0 : () => _(null),
|
|
58
|
+
icon: T(c)
|
|
71
59
|
} : (
|
|
72
60
|
// Always titled — matches the Sub-agent header; back arrow only when the
|
|
73
61
|
// category chooser is above (i.e. not the sole category).
|
|
74
62
|
{
|
|
75
63
|
title: "Tools",
|
|
76
|
-
onBack:
|
|
64
|
+
onBack: z ? void 0 : () => q(null)
|
|
77
65
|
}
|
|
78
|
-
) : null,
|
|
79
|
-
if (!
|
|
66
|
+
) : null, a = k(() => {
|
|
67
|
+
if (!d)
|
|
80
68
|
return A.map((n) => ({
|
|
81
69
|
id: n.key,
|
|
82
70
|
label: n.label,
|
|
83
71
|
drillsIn: !0,
|
|
84
72
|
onActivate: () => {
|
|
85
|
-
|
|
73
|
+
q(n.key), _(null);
|
|
86
74
|
}
|
|
87
75
|
}));
|
|
88
|
-
if (
|
|
76
|
+
if (d === "subagent") {
|
|
89
77
|
const n = w.trim().toLowerCase(), t = $.filter((o) => !n || I(o).toLowerCase().includes(n)).map((o) => ({
|
|
90
78
|
id: String(o.id),
|
|
91
79
|
label: I(o),
|
|
92
80
|
drillsIn: !1,
|
|
93
|
-
onActivate: () =>
|
|
81
|
+
onActivate: () => S(o)
|
|
94
82
|
}));
|
|
95
83
|
return y && t.push({
|
|
96
|
-
id:
|
|
84
|
+
id: ce,
|
|
97
85
|
label: "Create new",
|
|
98
86
|
drillsIn: !1,
|
|
99
87
|
isCreate: !0,
|
|
100
88
|
onActivate: () => {
|
|
101
|
-
|
|
89
|
+
v?.(), y();
|
|
102
90
|
}
|
|
103
91
|
}), t;
|
|
104
92
|
}
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const o = M.get(t);
|
|
111
|
-
if ((o !== void 0 ? o.connected : F?.[t]) === !1)
|
|
93
|
+
if (!c) {
|
|
94
|
+
const n = (x ?? []).map((t) => t.source).filter((t) => !O.includes(t));
|
|
95
|
+
return [...O, ...n].sort((t, o) => Q(t) - Q(o)).map((t) => {
|
|
96
|
+
const o = P.get(t);
|
|
97
|
+
if ((o !== void 0 ? o.connected : U?.[t]) === !1)
|
|
112
98
|
return {
|
|
113
99
|
id: t,
|
|
114
|
-
label:
|
|
100
|
+
label: M(t),
|
|
115
101
|
drillsIn: !1,
|
|
116
102
|
icon: T(t) ?? o?.icon,
|
|
117
103
|
rightLabel: "Connect",
|
|
118
104
|
onActivate: () => {
|
|
119
|
-
|
|
105
|
+
v?.(), o?.onConnect ? o.onConnect() : j?.(t);
|
|
120
106
|
}
|
|
121
107
|
};
|
|
122
|
-
const
|
|
123
|
-
(
|
|
108
|
+
const J = m.filter(
|
|
109
|
+
(L) => (f(L)?.source ?? "other") === t
|
|
124
110
|
);
|
|
125
|
-
if (
|
|
126
|
-
const
|
|
111
|
+
if (J.length + (o ? 1 : 0) === 1) {
|
|
112
|
+
const L = T(t) ?? o?.icon;
|
|
127
113
|
if (o)
|
|
128
114
|
return {
|
|
129
115
|
id: t,
|
|
130
116
|
label: o.label,
|
|
131
117
|
drillsIn: !1,
|
|
132
|
-
icon:
|
|
118
|
+
icon: L,
|
|
133
119
|
onActivate: () => {
|
|
134
|
-
|
|
120
|
+
v?.(), o.onSelect();
|
|
135
121
|
}
|
|
136
122
|
};
|
|
137
|
-
const
|
|
123
|
+
const B = J[0];
|
|
138
124
|
return {
|
|
139
|
-
id: String(
|
|
140
|
-
label: I(
|
|
125
|
+
id: String(B.id),
|
|
126
|
+
label: I(B),
|
|
141
127
|
drillsIn: !1,
|
|
142
|
-
icon:
|
|
143
|
-
authRequired:
|
|
144
|
-
onActivate: () =>
|
|
128
|
+
icon: L,
|
|
129
|
+
authRequired: f(B)?.authRequired,
|
|
130
|
+
onActivate: () => S(B)
|
|
145
131
|
};
|
|
146
132
|
}
|
|
147
133
|
return {
|
|
148
134
|
id: t,
|
|
149
|
-
label:
|
|
135
|
+
label: M(t),
|
|
150
136
|
drillsIn: !0,
|
|
151
137
|
icon: T(t) ?? o?.icon,
|
|
152
|
-
onActivate: () =>
|
|
138
|
+
onActivate: () => _(t)
|
|
153
139
|
};
|
|
154
140
|
});
|
|
155
141
|
}
|
|
156
|
-
const e = w.trim().toLowerCase(), r = m.filter((n) => (
|
|
142
|
+
const e = w.trim().toLowerCase(), r = m.filter((n) => (f(n)?.source ?? "other") === c).filter((n) => !e || I(n).toLowerCase().includes(e)).map((n) => ({
|
|
157
143
|
id: String(n.id),
|
|
158
144
|
label: I(n),
|
|
159
145
|
drillsIn: !1,
|
|
160
|
-
authRequired:
|
|
161
|
-
onActivate: () =>
|
|
162
|
-
})),
|
|
163
|
-
if (
|
|
164
|
-
const n =
|
|
146
|
+
authRequired: f(n)?.authRequired,
|
|
147
|
+
onActivate: () => S(n)
|
|
148
|
+
})), h = P.get(c);
|
|
149
|
+
if (h) {
|
|
150
|
+
const n = c in le;
|
|
165
151
|
r.push({
|
|
166
|
-
id: `create:${
|
|
167
|
-
label:
|
|
152
|
+
id: `create:${c}`,
|
|
153
|
+
label: h.label,
|
|
168
154
|
drillsIn: !1,
|
|
169
155
|
isCreate: !n,
|
|
170
156
|
onActivate: () => {
|
|
171
|
-
|
|
157
|
+
v?.(), h.onSelect();
|
|
172
158
|
}
|
|
173
159
|
});
|
|
174
160
|
}
|
|
175
161
|
return r;
|
|
176
162
|
}, [
|
|
177
|
-
a,
|
|
178
|
-
A,
|
|
179
163
|
d,
|
|
164
|
+
A,
|
|
165
|
+
c,
|
|
180
166
|
w,
|
|
181
167
|
m,
|
|
182
168
|
$,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
169
|
+
O,
|
|
170
|
+
S,
|
|
171
|
+
v,
|
|
186
172
|
y,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
173
|
+
x,
|
|
174
|
+
P,
|
|
175
|
+
U,
|
|
176
|
+
j
|
|
191
177
|
]);
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
if (
|
|
196
|
-
return
|
|
197
|
-
const { rows: r, activeIndex:
|
|
178
|
+
D(() => g(-1), [d, c, w, l]), D(() => F(""), [d, c]);
|
|
179
|
+
const G = ne({ rows: a, activeIndex: C, header: u });
|
|
180
|
+
G.current = { rows: a, activeIndex: C, header: u }, D(() => {
|
|
181
|
+
if (R)
|
|
182
|
+
return R((e) => {
|
|
183
|
+
const { rows: r, activeIndex: h, header: n } = G.current;
|
|
198
184
|
switch (e.key) {
|
|
199
185
|
case "ArrowDown":
|
|
200
186
|
return r.length && g((t) => (t + 1) % r.length), !0;
|
|
@@ -202,18 +188,18 @@ const h = (s) => s.meta, I = (s) => h(s)?.plainLabel ?? s.label, pe = "__bik_cre
|
|
|
202
188
|
return r.length && g((t) => (t + r.length - 1) % r.length), !0;
|
|
203
189
|
case "ArrowRight":
|
|
204
190
|
case "Enter":
|
|
205
|
-
return (r[
|
|
191
|
+
return (r[h] ?? r[0])?.onActivate(), !0;
|
|
206
192
|
case "ArrowLeft":
|
|
207
193
|
return n?.onBack ? (n.onBack(), !0) : !1;
|
|
208
194
|
default:
|
|
209
195
|
return !1;
|
|
210
196
|
}
|
|
211
|
-
}), () =>
|
|
212
|
-
}, [
|
|
213
|
-
const
|
|
214
|
-
return /* @__PURE__ */ b(
|
|
197
|
+
}), () => R(null);
|
|
198
|
+
}, [R]);
|
|
199
|
+
const Y = d ? a.length && !a[0].drillsIn ? "items" : "sources" : "categories", Z = d === "tool" && !!c || d === "subagent";
|
|
200
|
+
return /* @__PURE__ */ b(se, { className: `bik-mention-picker bik-mention-picker--${Y}`, children: [
|
|
215
201
|
u && /* @__PURE__ */ b(
|
|
216
|
-
|
|
202
|
+
be,
|
|
217
203
|
{
|
|
218
204
|
type: "button",
|
|
219
205
|
onClick: u.onBack,
|
|
@@ -223,91 +209,76 @@ const h = (s) => s.meta, I = (s) => h(s)?.plainLabel ?? s.label, pe = "__bik_cre
|
|
|
223
209
|
cursor: u.onBack ? "pointer" : "default"
|
|
224
210
|
},
|
|
225
211
|
children: [
|
|
226
|
-
u.onBack && /* @__PURE__ */
|
|
227
|
-
|
|
212
|
+
u.onBack && /* @__PURE__ */ s(
|
|
213
|
+
te,
|
|
228
214
|
{
|
|
229
215
|
width: 20,
|
|
230
216
|
height: 20,
|
|
231
217
|
color: i.content.primary
|
|
232
218
|
}
|
|
233
219
|
),
|
|
234
|
-
u.icon &&
|
|
235
|
-
/* @__PURE__ */ b(
|
|
220
|
+
u.icon && V(u.icon),
|
|
221
|
+
/* @__PURE__ */ b(re, { children: [
|
|
236
222
|
" ",
|
|
237
223
|
u.title
|
|
238
224
|
] })
|
|
239
225
|
]
|
|
240
226
|
}
|
|
241
227
|
),
|
|
242
|
-
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
|
|
228
|
+
Z && /* @__PURE__ */ b(de, { children: [
|
|
229
|
+
/* @__PURE__ */ s(
|
|
230
|
+
ee,
|
|
245
231
|
{
|
|
246
232
|
width: 20,
|
|
247
233
|
height: 20,
|
|
248
234
|
color: i.content.placeholder
|
|
249
235
|
}
|
|
250
236
|
),
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
|
|
237
|
+
/* @__PURE__ */ s(
|
|
238
|
+
ue,
|
|
253
239
|
{
|
|
254
240
|
autoFocus: !0,
|
|
255
241
|
value: w,
|
|
256
242
|
placeholder: "Search",
|
|
257
243
|
"data-test": "mention-picker-search",
|
|
258
|
-
onChange: (e) =>
|
|
244
|
+
onChange: (e) => F(e.target.value),
|
|
259
245
|
onKeyDown: (e) => {
|
|
260
|
-
|
|
246
|
+
a.length && (e.key === "ArrowDown" ? (e.preventDefault(), g((r) => (r + 1) % a.length)) : e.key === "ArrowUp" ? (e.preventDefault(), g((r) => (r + a.length - 1) % a.length)) : e.key === "Enter" && (e.preventDefault(), (a[C] ?? a[0])?.onActivate()));
|
|
261
247
|
}
|
|
262
248
|
}
|
|
263
249
|
)
|
|
264
250
|
] }),
|
|
265
|
-
a === "
|
|
266
|
-
|
|
267
|
-
// variable dismisses the menu FIRST (strips the typed "@" + query),
|
|
268
|
-
// then hands the variable up to insert its `{{token}}` at the cursor.
|
|
269
|
-
/* @__PURE__ */ c(
|
|
270
|
-
ue,
|
|
271
|
-
{
|
|
272
|
-
type: ce.EMBEDDED,
|
|
273
|
-
data: _ ?? [],
|
|
274
|
-
showRecommendedBar: !1,
|
|
275
|
-
onSelect: (e) => {
|
|
276
|
-
x?.(), O?.(e);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
)
|
|
280
|
-
) : l.length === 0 ? /* @__PURE__ */ c(we, { children: a === "subagent" ? null : "No tools available" }) : l.map((e, r) => /* @__PURE__ */ c(
|
|
281
|
-
me,
|
|
251
|
+
a.length === 0 ? /* @__PURE__ */ s(xe, { children: d === "subagent" ? null : "No tools available" }) : a.map((e, r) => /* @__PURE__ */ s(
|
|
252
|
+
pe,
|
|
282
253
|
{
|
|
283
254
|
type: "button",
|
|
284
|
-
$active: r ===
|
|
255
|
+
$active: r === C,
|
|
285
256
|
onMouseEnter: () => g(r),
|
|
286
257
|
onMouseLeave: () => g(-1),
|
|
287
258
|
onClick: e.onActivate,
|
|
288
|
-
children: e.isCreate ? /* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */ b(
|
|
290
|
-
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
e.authRequired && /* @__PURE__ */
|
|
293
|
-
|
|
259
|
+
children: e.isCreate ? /* @__PURE__ */ s(me, { children: e.label }) : /* @__PURE__ */ b(K, { children: [
|
|
260
|
+
/* @__PURE__ */ b(he, { children: [
|
|
261
|
+
V(e.icon),
|
|
262
|
+
/* @__PURE__ */ s(oe, { color: i.content.primary, children: e.label }),
|
|
263
|
+
e.authRequired && /* @__PURE__ */ s(
|
|
264
|
+
W,
|
|
294
265
|
{
|
|
295
266
|
size: 14,
|
|
296
|
-
"aria-label": "
|
|
267
|
+
"aria-label": "This tool requires customer verification"
|
|
297
268
|
}
|
|
298
269
|
)
|
|
299
270
|
] }),
|
|
300
|
-
e.rightLabel ? /* @__PURE__ */
|
|
271
|
+
e.rightLabel ? /* @__PURE__ */ s(ge, { children: e.rightLabel }) : e.drillsIn && /* @__PURE__ */ s(H, { width: 12, height: 12 })
|
|
301
272
|
] })
|
|
302
273
|
},
|
|
303
274
|
e.id
|
|
304
275
|
)),
|
|
305
|
-
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
276
|
+
a.some((e) => e.authRequired) && /* @__PURE__ */ b(fe, { children: [
|
|
277
|
+
/* @__PURE__ */ s(W, { size: 14 }),
|
|
278
|
+
/* @__PURE__ */ s(ie, { color: i.content.secondary, children: "This tool requires customer verification" })
|
|
308
279
|
] })
|
|
309
280
|
] });
|
|
310
|
-
},
|
|
281
|
+
}, se = p.div`
|
|
311
282
|
display: flex;
|
|
312
283
|
flex-direction: column;
|
|
313
284
|
min-width: 240px;
|
|
@@ -317,13 +288,13 @@ const h = (s) => s.meta, I = (s) => h(s)?.plainLabel ?? s.label, pe = "__bik_cre
|
|
|
317
288
|
border: 1px solid ${i.stroke.primary};
|
|
318
289
|
border-radius: 4px;
|
|
319
290
|
box-shadow: 0px -2px 8px 0px #0000001f;
|
|
320
|
-
`,
|
|
291
|
+
`, de = p.div`
|
|
321
292
|
display: flex;
|
|
322
293
|
align-items: center;
|
|
323
294
|
gap: 8px;
|
|
324
295
|
padding: 10px 12px;
|
|
325
296
|
border-bottom: 1px solid ${i.stroke.primary};
|
|
326
|
-
`,
|
|
297
|
+
`, ue = p.input`
|
|
327
298
|
flex: 1;
|
|
328
299
|
min-width: 0;
|
|
329
300
|
border: none;
|
|
@@ -336,7 +307,7 @@ const h = (s) => s.meta, I = (s) => h(s)?.plainLabel ?? s.label, pe = "__bik_cre
|
|
|
336
307
|
&::placeholder {
|
|
337
308
|
color: ${i.content.placeholder};
|
|
338
309
|
}
|
|
339
|
-
`,
|
|
310
|
+
`, pe = p.button`
|
|
340
311
|
display: flex;
|
|
341
312
|
justify-content: space-between;
|
|
342
313
|
align-items: center;
|
|
@@ -346,39 +317,39 @@ const h = (s) => s.meta, I = (s) => h(s)?.plainLabel ?? s.label, pe = "__bik_cre
|
|
|
346
317
|
height: 48px;
|
|
347
318
|
border: none;
|
|
348
319
|
border-bottom: 1px solid ${i.stroke.primary};
|
|
349
|
-
background: ${(
|
|
320
|
+
background: ${(l) => l.$active ? i.surface.subdued : "transparent"};
|
|
350
321
|
cursor: pointer;
|
|
351
322
|
text-align: left;
|
|
352
323
|
|
|
353
324
|
&:hover {
|
|
354
325
|
background: ${i.surface.hovered};
|
|
355
326
|
}
|
|
356
|
-
`,
|
|
327
|
+
`, he = p.div`
|
|
357
328
|
display: flex;
|
|
358
329
|
align-items: center;
|
|
359
330
|
gap: 12px;
|
|
360
331
|
min-width: 0;
|
|
361
|
-
`,
|
|
332
|
+
`, fe = p.div`
|
|
362
333
|
display: flex;
|
|
363
334
|
align-items: center;
|
|
364
335
|
gap: 6px;
|
|
365
336
|
padding: 8px 12px;
|
|
366
337
|
border-top: 1px solid ${i.stroke.primary};
|
|
367
|
-
`,
|
|
338
|
+
`, ge = p.span`
|
|
368
339
|
flex-shrink: 0;
|
|
369
340
|
color: ${i.content.brand};
|
|
370
341
|
font-family: Inter;
|
|
371
342
|
font-size: 14px;
|
|
372
343
|
font-weight: 600;
|
|
373
344
|
white-space: nowrap;
|
|
374
|
-
`,
|
|
345
|
+
`, me = p.div`
|
|
375
346
|
width: 100%;
|
|
376
347
|
text-align: center;
|
|
377
348
|
color: ${i.content.brand};
|
|
378
349
|
font-family: Inter;
|
|
379
350
|
font-size: 14px;
|
|
380
351
|
font-weight: 600;
|
|
381
|
-
`,
|
|
352
|
+
`, be = p.button`
|
|
382
353
|
display: flex;
|
|
383
354
|
align-items: center;
|
|
384
355
|
padding: 12px 16px;
|
|
@@ -391,13 +362,13 @@ const h = (s) => s.meta, I = (s) => h(s)?.plainLabel ?? s.label, pe = "__bik_cre
|
|
|
391
362
|
font-weight: 600;
|
|
392
363
|
height: 48px;
|
|
393
364
|
gap: 4px;
|
|
394
|
-
`,
|
|
365
|
+
`, xe = p.div`
|
|
395
366
|
padding: 12px 10px;
|
|
396
367
|
font-family: Inter;
|
|
397
368
|
font-size: 13px;
|
|
398
369
|
color: ${i.content.secondary};
|
|
399
370
|
`;
|
|
400
371
|
export {
|
|
401
|
-
|
|
372
|
+
Te as MentionPicker
|
|
402
373
|
};
|
|
403
374
|
//# sourceMappingURL=MentionPicker.js.map
|