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