@bikdotai/bik-component-library 0.0.865-beta.4 → 0.0.865-beta.6
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 +29 -151
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +5 -5
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionEditor.js +2 -2
- 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 +13 -13
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +3 -3
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/cjs/components/agent-builder/constants/steps.js +1 -1
- package/dist/cjs/components/agent-builder/constants/steps.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/Step1About.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step1About.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js +2 -2
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.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/steps/Step4HandoverRules.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.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/button/Button.js +1 -1
- package/dist/cjs/components/button/Button.js.map +1 -1
- package/dist/cjs/components/button/Button.styled.js +2 -2
- package/dist/cjs/components/button/Button.styled.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/Tag.js.map +1 -1
- package/dist/cjs/components/tag/Tag.styled.js +4 -4
- package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
- package/dist/cjs/components/tag/model.js.map +1 -1
- package/dist/cjs/icons/BIK AI specific/WandSparkles.js +1 -1
- package/dist/cjs/icons/BIK AI specific/WandSparkles.js.map +1 -1
- package/dist/cjs/icons/Informational/General/MessageSource.js +2 -0
- package/dist/cjs/icons/Informational/General/MessageSource.js.map +1 -0
- package/dist/cjs/icons/index.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.js +97 -103
- package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +0 -76
- package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +0 -68
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js +59 -224
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +132 -135
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionEditor.d.ts +0 -2
- package/dist/esm/components/agent-builder/components/MentionEditor.js +45 -47
- package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionField.js +51 -52
- package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +0 -5
- package/dist/esm/components/agent-builder/components/MentionPicker.js +132 -134
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +0 -2
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +46 -48
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/constants/steps.d.ts +1 -31
- package/dist/esm/components/agent-builder/constants/steps.js +6 -15
- package/dist/esm/components/agent-builder/constants/steps.js.map +1 -1
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +1 -13
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +148 -157
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/esm/components/agent-builder/index.d.ts +2 -5
- package/dist/esm/components/agent-builder/steps/Step1About.js +13 -15
- package/dist/esm/components/agent-builder/steps/Step1About.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js +48 -55
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +157 -158
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.d.ts +0 -11
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js +23 -127
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +2 -7
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js +2 -2
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/esm/components/button/Button.js +21 -19
- package/dist/esm/components/button/Button.js.map +1 -1
- package/dist/esm/components/button/Button.styled.d.ts +1 -0
- package/dist/esm/components/button/Button.styled.js +5 -5
- package/dist/esm/components/button/Button.styled.js.map +1 -1
- package/dist/esm/components/button/model.d.ts +5 -0
- package/dist/esm/components/dropdown-button/DropdownButton.d.ts +5 -0
- package/dist/esm/components/dropdown-button/DropdownButton.js +4 -3
- package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/esm/components/tag/Tag.d.ts +1 -1
- package/dist/esm/components/tag/Tag.js +48 -41
- package/dist/esm/components/tag/Tag.js.map +1 -1
- package/dist/esm/components/tag/Tag.styled.d.ts +3 -0
- package/dist/esm/components/tag/Tag.styled.js +6 -9
- package/dist/esm/components/tag/Tag.styled.js.map +1 -1
- package/dist/esm/components/tag/model.d.ts +11 -0
- package/dist/esm/components/tag/model.js.map +1 -1
- package/dist/esm/icons/BIK AI specific/WandSparkles.js +1 -1
- package/dist/esm/icons/BIK AI specific/WandSparkles.js.map +1 -1
- package/dist/esm/icons/Informational/General/MessageSource.d.ts +7 -0
- package/dist/esm/icons/Informational/General/MessageSource.js +46 -0
- package/dist/esm/icons/Informational/General/MessageSource.js.map +1 -0
- package/dist/esm/icons/Informational/General/index.d.ts +1 -0
- package/dist/esm/icons/index.d.ts +25 -25
- package/dist/esm/icons/index.js +294 -292
- package/dist/esm/icons/index.js.map +1 -1
- package/dist/esm/index.js +636 -644
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js +0 -2
- package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/ChannelsSection.js +0 -2
- package/dist/cjs/components/agent-builder/components/ChannelsSection.js.map +0 -1
- package/dist/cjs/components/agent-builder/constants/channels.js +0 -2
- package/dist/cjs/components/agent-builder/constants/channels.js.map +0 -1
- package/dist/esm/components/agent-builder/components/ChannelSelectModal.d.ts +0 -26
- package/dist/esm/components/agent-builder/components/ChannelSelectModal.js +0 -121
- package/dist/esm/components/agent-builder/components/ChannelSelectModal.js.map +0 -1
- package/dist/esm/components/agent-builder/components/ChannelsSection.d.ts +0 -10
- package/dist/esm/components/agent-builder/components/ChannelsSection.js +0 -183
- package/dist/esm/components/agent-builder/components/ChannelsSection.js.map +0 -1
- package/dist/esm/components/agent-builder/constants/channels.d.ts +0 -56
- package/dist/esm/components/agent-builder/constants/channels.js +0 -41
- package/dist/esm/components/agent-builder/constants/channels.js.map +0 -1
|
@@ -1,112 +1,111 @@
|
|
|
1
|
-
import { jsxs as x, jsx as c, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useState as
|
|
1
|
+
import { jsxs as x, jsx as c, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
+
import ce from "../../../assets/icons/chevronRight.svg.js";
|
|
3
|
+
import se from "../../../assets/icons/searchIcon.svg.js";
|
|
4
|
+
import de from "../../../icons/Arrows/Normal arrows/ArrowLeft.js";
|
|
5
|
+
import { useState as M, useMemo as I, useEffect as V, useRef as ue } from "react";
|
|
6
6
|
import u from "styled-components";
|
|
7
|
-
import { TitleSmall as
|
|
7
|
+
import { TitleSmall as he, BodySecondary as pe, BodyCaption as fe } from "../../TypographyStyle.js";
|
|
8
8
|
import { COLORS as o } from "../../../constants/Theme.js";
|
|
9
|
-
import { PickerType as
|
|
10
|
-
import { CATEGORIES as
|
|
11
|
-
import { toolSourceLabel as
|
|
12
|
-
import { renderSourceIcon as
|
|
13
|
-
import
|
|
14
|
-
import { VariablePicker as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
Icon:
|
|
9
|
+
import { PickerType as ge } from "../../variable-picker-v3/model.js";
|
|
10
|
+
import { CATEGORIES as be, MORE_INTEGRATIONS_KEY as v, isMoreIntegrationSource as z, toolSourceRank as j, MORE_INTEGRATIONS_LABEL as ee, isIntegrationSource as me, CONFIG_TOOL_SOURCES as ke, MORE_INTEGRATIONS_RANK as xe } from "../constants/tools.js";
|
|
11
|
+
import { toolSourceLabel as Y } from "../utils/mentionSerialization.js";
|
|
12
|
+
import { renderSourceIcon as te, sourceIcon as q } from "../utils/sourceIcons.js";
|
|
13
|
+
import ve from "../../../icons/Informational/Identity/PuzzlePiece.js";
|
|
14
|
+
import { VariablePicker as we } from "../../variable-picker-v3/VariablePicker.js";
|
|
15
|
+
import re from "../../../icons/Informational/Common UI/Shield.js";
|
|
16
|
+
const ne = {
|
|
17
|
+
Icon: ve,
|
|
18
18
|
w: 20,
|
|
19
19
|
h: 20
|
|
20
|
-
}, b = (s) => s.meta, A = (s) => b(s)?.plainLabel ?? s.label,
|
|
20
|
+
}, b = (s) => s.meta, A = (s) => b(s)?.plainLabel ?? s.label, ye = "__bik_create_subagent__", Xe = ({
|
|
21
21
|
items: s,
|
|
22
|
-
onSelect:
|
|
23
|
-
registerKeyHandler:
|
|
22
|
+
onSelect: L,
|
|
23
|
+
registerKeyHandler: C,
|
|
24
24
|
onClose: w,
|
|
25
25
|
onCreateSubAgent: R,
|
|
26
|
-
initialSource:
|
|
26
|
+
initialSource: H,
|
|
27
27
|
toolActions: y,
|
|
28
|
-
integrationStatus:
|
|
29
|
-
onConnectIntegration:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
onSelectVariable: F
|
|
28
|
+
integrationStatus: J,
|
|
29
|
+
onConnectIntegration: K,
|
|
30
|
+
variablesData: D,
|
|
31
|
+
onSelectVariable: G
|
|
33
32
|
}) => {
|
|
34
|
-
const [
|
|
33
|
+
const [oe, $] = M(null), [i, S] = M(H ?? null), [B, m] = M(-1), [E, Q] = M(""), k = I(
|
|
35
34
|
() => s.filter((e) => b(e)?.kind === "tool"),
|
|
36
35
|
[s]
|
|
37
|
-
),
|
|
36
|
+
), O = I(
|
|
38
37
|
() => s.filter((e) => b(e)?.kind === "subagent"),
|
|
39
38
|
[s]
|
|
40
|
-
),
|
|
39
|
+
), F = I(() => {
|
|
41
40
|
const e = [];
|
|
42
41
|
return k.forEach((n) => {
|
|
43
42
|
const f = b(n)?.source ?? "other";
|
|
44
43
|
e.includes(f) || e.push(f);
|
|
45
44
|
}), e;
|
|
46
|
-
}, [k]),
|
|
45
|
+
}, [k]), U = I(
|
|
47
46
|
() => new Map(
|
|
48
47
|
(y ?? []).map((e) => [e.source, e])
|
|
49
48
|
),
|
|
50
49
|
[y]
|
|
51
|
-
),
|
|
52
|
-
() =>
|
|
50
|
+
), T = I(
|
|
51
|
+
() => be.filter((e) => e.key === "tool" ? k.length > 0 || (y?.length ?? 0) > 0 : e.key === "variable" ? (D?.length ?? 0) > 0 && !!G : O.length > 0 || !!R),
|
|
53
52
|
[
|
|
54
53
|
k.length,
|
|
55
|
-
|
|
54
|
+
O.length,
|
|
56
55
|
R,
|
|
57
56
|
y?.length,
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
D?.length,
|
|
58
|
+
G
|
|
60
59
|
]
|
|
61
|
-
),
|
|
60
|
+
), _ = T.length === 1 ? T[0].key : null, a = oe ?? _, h = a ? a === "subagent" ? (
|
|
62
61
|
// Always titled — with a back arrow only when the category chooser is above.
|
|
63
62
|
{
|
|
64
63
|
title: "Sub-agent",
|
|
65
|
-
onBack:
|
|
64
|
+
onBack: _ ? void 0 : () => $(null)
|
|
66
65
|
}
|
|
67
66
|
) : a === "variable" ? {
|
|
68
67
|
title: "Variables",
|
|
69
|
-
onBack:
|
|
68
|
+
onBack: _ ? void 0 : () => $(null)
|
|
70
69
|
} : i === v ? {
|
|
71
|
-
title:
|
|
70
|
+
title: ee,
|
|
72
71
|
onBack: () => S(null),
|
|
73
|
-
icon:
|
|
72
|
+
icon: ne
|
|
74
73
|
} : i ? {
|
|
75
|
-
title:
|
|
74
|
+
title: Y(i),
|
|
76
75
|
// Deep-linked to a source (opened from a right-panel source button):
|
|
77
76
|
// that source IS the root, so no back arrow. Otherwise back returns to
|
|
78
77
|
// the "More Integrations" umbrella for a vendor that lives under it,
|
|
79
78
|
// else to the source chooser.
|
|
80
|
-
onBack:
|
|
81
|
-
|
|
79
|
+
onBack: H ? void 0 : () => S(
|
|
80
|
+
z(i) ? v : null
|
|
82
81
|
),
|
|
83
|
-
icon:
|
|
82
|
+
icon: q(i)
|
|
84
83
|
} : (
|
|
85
84
|
// Always titled — matches the Sub-agent header; back arrow only when the
|
|
86
85
|
// category chooser is above (i.e. not the sole category).
|
|
87
86
|
{
|
|
88
87
|
title: "Tools",
|
|
89
|
-
onBack:
|
|
88
|
+
onBack: _ ? void 0 : () => $(null)
|
|
90
89
|
}
|
|
91
90
|
) : null, d = I(() => {
|
|
92
91
|
if (!a)
|
|
93
|
-
return
|
|
92
|
+
return T.map((r) => ({
|
|
94
93
|
id: r.key,
|
|
95
94
|
label: r.label,
|
|
96
95
|
drillsIn: !0,
|
|
97
96
|
onActivate: () => {
|
|
98
|
-
|
|
97
|
+
$(r.key), S(null);
|
|
99
98
|
}
|
|
100
99
|
}));
|
|
101
100
|
if (a === "subagent") {
|
|
102
|
-
const r = E.trim().toLowerCase(), p =
|
|
101
|
+
const r = E.trim().toLowerCase(), p = O.filter((g) => !r || A(g).toLowerCase().includes(r)).map((g) => ({
|
|
103
102
|
id: String(g.id),
|
|
104
103
|
label: A(g),
|
|
105
104
|
drillsIn: !1,
|
|
106
|
-
onActivate: () =>
|
|
105
|
+
onActivate: () => L(g)
|
|
107
106
|
}));
|
|
108
107
|
return R && p.push({
|
|
109
|
-
id:
|
|
108
|
+
id: ye,
|
|
110
109
|
label: "Create new",
|
|
111
110
|
drillsIn: !1,
|
|
112
111
|
isCreate: !0,
|
|
@@ -118,75 +117,75 @@ const oe = {
|
|
|
118
117
|
if (a === "variable")
|
|
119
118
|
return [];
|
|
120
119
|
if (!i || i === v) {
|
|
121
|
-
const r = (y ?? []).map((t) => t.source).filter((t) => !
|
|
122
|
-
const l =
|
|
123
|
-
if ((l !== void 0 ? l.connected :
|
|
120
|
+
const r = (y ?? []).map((t) => t.source).filter((t) => !F.includes(t)), p = [...F, ...r], g = (t) => {
|
|
121
|
+
const l = U.get(t);
|
|
122
|
+
if ((l !== void 0 ? l.connected : J?.[t]) === !1)
|
|
124
123
|
return {
|
|
125
124
|
id: t,
|
|
126
|
-
label:
|
|
125
|
+
label: Y(t),
|
|
127
126
|
drillsIn: !1,
|
|
128
|
-
icon:
|
|
127
|
+
icon: q(t) ?? l?.icon,
|
|
129
128
|
rightLabel: "Connect",
|
|
130
129
|
onActivate: () => {
|
|
131
|
-
w?.(), l?.onConnect ? l.onConnect() :
|
|
130
|
+
w?.(), l?.onConnect ? l.onConnect() : K?.(t);
|
|
132
131
|
}
|
|
133
132
|
};
|
|
134
|
-
const
|
|
135
|
-
(
|
|
133
|
+
const Z = k.filter(
|
|
134
|
+
(P) => (b(P)?.source ?? "other") === t
|
|
136
135
|
);
|
|
137
|
-
if (
|
|
138
|
-
const
|
|
136
|
+
if (Z.length + (l ? 1 : 0) === 1 && !(l === void 0 && me(t))) {
|
|
137
|
+
const P = q(t) ?? l?.icon;
|
|
139
138
|
if (l)
|
|
140
139
|
return {
|
|
141
140
|
id: t,
|
|
142
141
|
label: l.label,
|
|
143
142
|
drillsIn: !1,
|
|
144
|
-
icon:
|
|
143
|
+
icon: P,
|
|
145
144
|
onActivate: () => {
|
|
146
145
|
w?.(), l.onSelect();
|
|
147
146
|
}
|
|
148
147
|
};
|
|
149
|
-
const
|
|
148
|
+
const N = Z[0];
|
|
150
149
|
return {
|
|
151
|
-
id: String(
|
|
152
|
-
label: A(
|
|
150
|
+
id: String(N.id),
|
|
151
|
+
label: A(N),
|
|
153
152
|
drillsIn: !1,
|
|
154
|
-
icon:
|
|
155
|
-
authRequired: b(
|
|
156
|
-
onActivate: () =>
|
|
153
|
+
icon: P,
|
|
154
|
+
authRequired: b(N)?.authRequired,
|
|
155
|
+
onActivate: () => L(N)
|
|
157
156
|
};
|
|
158
157
|
}
|
|
159
158
|
return {
|
|
160
159
|
id: t,
|
|
161
|
-
label:
|
|
160
|
+
label: Y(t),
|
|
162
161
|
drillsIn: !0,
|
|
163
|
-
icon:
|
|
162
|
+
icon: q(t) ?? l?.icon,
|
|
164
163
|
onActivate: () => S(t)
|
|
165
164
|
};
|
|
166
165
|
};
|
|
167
166
|
if (i === v)
|
|
168
|
-
return p.filter((t) =>
|
|
169
|
-
const
|
|
170
|
-
return p.some((t) =>
|
|
171
|
-
rank:
|
|
167
|
+
return p.filter((t) => z(t)).sort((t, l) => j(t) - j(l)).map(g);
|
|
168
|
+
const X = p.filter((t) => !z(t)).map((t) => ({ row: g(t), rank: j(t) }));
|
|
169
|
+
return p.some((t) => z(t)) && X.push({
|
|
170
|
+
rank: xe,
|
|
172
171
|
row: {
|
|
173
172
|
id: v,
|
|
174
|
-
label:
|
|
173
|
+
label: ee,
|
|
175
174
|
drillsIn: !0,
|
|
176
|
-
icon:
|
|
175
|
+
icon: ne,
|
|
177
176
|
onActivate: () => S(v)
|
|
178
177
|
}
|
|
179
|
-
}),
|
|
178
|
+
}), X.sort((t, l) => t.rank - l.rank).map((t) => t.row);
|
|
180
179
|
}
|
|
181
180
|
const e = E.trim().toLowerCase(), n = k.filter((r) => (b(r)?.source ?? "other") === i).filter((r) => !e || A(r).toLowerCase().includes(e)).map((r) => ({
|
|
182
181
|
id: String(r.id),
|
|
183
182
|
label: A(r),
|
|
184
183
|
drillsIn: !1,
|
|
185
184
|
authRequired: b(r)?.authRequired,
|
|
186
|
-
onActivate: () =>
|
|
187
|
-
})), f =
|
|
185
|
+
onActivate: () => L(r)
|
|
186
|
+
})), f = U.get(i);
|
|
188
187
|
if (f) {
|
|
189
|
-
const r = i in
|
|
188
|
+
const r = i in ke;
|
|
190
189
|
n.push({
|
|
191
190
|
id: `create:${i}`,
|
|
192
191
|
label: f.label,
|
|
@@ -200,27 +199,26 @@ const oe = {
|
|
|
200
199
|
return n;
|
|
201
200
|
}, [
|
|
202
201
|
a,
|
|
203
|
-
|
|
202
|
+
T,
|
|
204
203
|
i,
|
|
205
204
|
E,
|
|
206
205
|
k,
|
|
206
|
+
O,
|
|
207
|
+
F,
|
|
207
208
|
L,
|
|
208
|
-
U,
|
|
209
|
-
C,
|
|
210
209
|
w,
|
|
211
210
|
R,
|
|
212
211
|
y,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
B
|
|
212
|
+
U,
|
|
213
|
+
J,
|
|
214
|
+
K
|
|
217
215
|
]);
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
if (
|
|
222
|
-
return
|
|
223
|
-
const { rows: n, activeIndex: f, header: r } =
|
|
216
|
+
V(() => m(-1), [a, i, E, s]), V(() => Q(""), [a, i]);
|
|
217
|
+
const W = ue({ rows: d, activeIndex: B, header: h });
|
|
218
|
+
W.current = { rows: d, activeIndex: B, header: h }, V(() => {
|
|
219
|
+
if (C)
|
|
220
|
+
return C((e) => {
|
|
221
|
+
const { rows: n, activeIndex: f, header: r } = W.current;
|
|
224
222
|
if (!n.length && e.key !== "ArrowLeft")
|
|
225
223
|
return !1;
|
|
226
224
|
switch (e.key) {
|
|
@@ -236,17 +234,17 @@ const oe = {
|
|
|
236
234
|
default:
|
|
237
235
|
return !1;
|
|
238
236
|
}
|
|
239
|
-
}), () =>
|
|
240
|
-
}, [
|
|
241
|
-
const
|
|
237
|
+
}), () => C(null);
|
|
238
|
+
}, [C]);
|
|
239
|
+
const ie = a ? d.length && !d[0].drillsIn ? "items" : "sources" : "categories", le = a === "tool" && !!i && i !== v || a === "subagent";
|
|
242
240
|
return /* @__PURE__ */ x(
|
|
243
|
-
|
|
241
|
+
Ie,
|
|
244
242
|
{
|
|
245
|
-
className: `bik-mention-picker bik-mention-picker--${
|
|
243
|
+
className: `bik-mention-picker bik-mention-picker--${ie}`,
|
|
246
244
|
$fixedHeight: a === "variable",
|
|
247
245
|
children: [
|
|
248
246
|
h && /* @__PURE__ */ x(
|
|
249
|
-
|
|
247
|
+
Te,
|
|
250
248
|
{
|
|
251
249
|
type: "button",
|
|
252
250
|
onClick: h.onBack,
|
|
@@ -257,24 +255,24 @@ const oe = {
|
|
|
257
255
|
},
|
|
258
256
|
children: [
|
|
259
257
|
h.onBack && /* @__PURE__ */ c(
|
|
260
|
-
|
|
258
|
+
de,
|
|
261
259
|
{
|
|
262
260
|
width: 20,
|
|
263
261
|
height: 20,
|
|
264
262
|
color: o.content.primary
|
|
265
263
|
}
|
|
266
264
|
),
|
|
267
|
-
h.icon &&
|
|
268
|
-
/* @__PURE__ */ x(
|
|
265
|
+
h.icon && te(h.icon),
|
|
266
|
+
/* @__PURE__ */ x(he, { children: [
|
|
269
267
|
" ",
|
|
270
268
|
h.title
|
|
271
269
|
] })
|
|
272
270
|
]
|
|
273
271
|
}
|
|
274
272
|
),
|
|
275
|
-
|
|
273
|
+
le && /* @__PURE__ */ x(Ee, { children: [
|
|
276
274
|
/* @__PURE__ */ c(
|
|
277
|
-
|
|
275
|
+
se,
|
|
278
276
|
{
|
|
279
277
|
width: 20,
|
|
280
278
|
height: 20,
|
|
@@ -282,15 +280,15 @@ const oe = {
|
|
|
282
280
|
}
|
|
283
281
|
),
|
|
284
282
|
/* @__PURE__ */ c(
|
|
285
|
-
|
|
283
|
+
Ae,
|
|
286
284
|
{
|
|
287
285
|
autoFocus: !0,
|
|
288
286
|
value: E,
|
|
289
287
|
placeholder: "Search",
|
|
290
288
|
"data-test": "mention-picker-search",
|
|
291
|
-
onChange: (e) =>
|
|
289
|
+
onChange: (e) => Q(e.target.value),
|
|
292
290
|
onKeyDown: (e) => {
|
|
293
|
-
d.length && (e.key === "ArrowDown" ? (e.preventDefault(), m((n) => (n + 1) % d.length)) : e.key === "ArrowUp" ? (e.preventDefault(), m((n) => (n + d.length - 1) % d.length)) : e.key === "Enter" && (e.preventDefault(), (d[
|
|
291
|
+
d.length && (e.key === "ArrowDown" ? (e.preventDefault(), m((n) => (n + 1) % d.length)) : e.key === "ArrowUp" ? (e.preventDefault(), m((n) => (n + d.length - 1) % d.length)) : e.key === "Enter" && (e.preventDefault(), (d[B] ?? d[0])?.onActivate()));
|
|
294
292
|
}
|
|
295
293
|
}
|
|
296
294
|
)
|
|
@@ -301,51 +299,51 @@ const oe = {
|
|
|
301
299
|
// fixed and only the variable list below scrolls. Selecting a
|
|
302
300
|
// variable dismisses the menu FIRST (strips the typed "@" + query),
|
|
303
301
|
// then hands the variable up to insert its `{{token}}` at the cursor.
|
|
304
|
-
/* @__PURE__ */ c(
|
|
305
|
-
|
|
302
|
+
/* @__PURE__ */ c(Se, { children: /* @__PURE__ */ c(
|
|
303
|
+
we,
|
|
306
304
|
{
|
|
307
|
-
type:
|
|
308
|
-
data:
|
|
305
|
+
type: ge.EMBEDDED,
|
|
306
|
+
data: D ?? [],
|
|
309
307
|
showRecommendedBar: !0,
|
|
310
308
|
skipDefaultVariableContent: !0,
|
|
311
309
|
onSelect: (e) => {
|
|
312
|
-
w?.(),
|
|
310
|
+
w?.(), G?.(e);
|
|
313
311
|
}
|
|
314
312
|
}
|
|
315
313
|
) })
|
|
316
|
-
) : d.length === 0 ? /* @__PURE__ */ c(
|
|
317
|
-
|
|
314
|
+
) : d.length === 0 ? /* @__PURE__ */ c(_e, { children: a === "subagent" ? null : "No tools available" }) : /* @__PURE__ */ c(Re, { children: d.map((e, n) => /* @__PURE__ */ c(
|
|
315
|
+
Le,
|
|
318
316
|
{
|
|
319
317
|
type: "button",
|
|
320
|
-
$active: n ===
|
|
318
|
+
$active: n === B,
|
|
321
319
|
onMouseEnter: () => m(n),
|
|
322
320
|
onMouseLeave: () => m(-1),
|
|
323
321
|
onClick: e.onActivate,
|
|
324
|
-
children: e.isCreate ? /* @__PURE__ */ c(
|
|
325
|
-
/* @__PURE__ */ x(
|
|
326
|
-
|
|
327
|
-
/* @__PURE__ */ c(
|
|
322
|
+
children: e.isCreate ? /* @__PURE__ */ c(Oe, { children: e.label }) : /* @__PURE__ */ x(ae, { children: [
|
|
323
|
+
/* @__PURE__ */ x(Ce, { children: [
|
|
324
|
+
te(e.icon),
|
|
325
|
+
/* @__PURE__ */ c(pe, { color: o.content.primary, children: e.label }),
|
|
328
326
|
e.authRequired && /* @__PURE__ */ c(
|
|
329
|
-
|
|
327
|
+
re,
|
|
330
328
|
{
|
|
331
329
|
size: 14,
|
|
332
330
|
"aria-label": "Requires customer verification"
|
|
333
331
|
}
|
|
334
332
|
)
|
|
335
333
|
] }),
|
|
336
|
-
e.rightLabel ? /* @__PURE__ */ c(
|
|
334
|
+
e.rightLabel ? /* @__PURE__ */ c(Be, { children: e.rightLabel }) : e.drillsIn && /* @__PURE__ */ c(ce, { width: 12, height: 12 })
|
|
337
335
|
] })
|
|
338
336
|
},
|
|
339
337
|
e.id
|
|
340
338
|
)) }),
|
|
341
|
-
d.some((e) => e.authRequired) && /* @__PURE__ */ x(
|
|
342
|
-
/* @__PURE__ */ c(
|
|
343
|
-
/* @__PURE__ */ c(
|
|
339
|
+
d.some((e) => e.authRequired) && /* @__PURE__ */ x($e, { children: [
|
|
340
|
+
/* @__PURE__ */ c(re, { size: 16 }),
|
|
341
|
+
/* @__PURE__ */ c(fe, { color: o.content.secondary, children: "Requires customer verification" })
|
|
344
342
|
] })
|
|
345
343
|
]
|
|
346
344
|
}
|
|
347
345
|
);
|
|
348
|
-
},
|
|
346
|
+
}, Ie = u.div`
|
|
349
347
|
display: flex;
|
|
350
348
|
flex-direction: column;
|
|
351
349
|
min-width: 240px;
|
|
@@ -358,7 +356,7 @@ const oe = {
|
|
|
358
356
|
border: 1px solid ${o.stroke.primary};
|
|
359
357
|
border-radius: 4px;
|
|
360
358
|
box-shadow: 0px -2px 8px 0px #0000001f;
|
|
361
|
-
`,
|
|
359
|
+
`, Re = u.div`
|
|
362
360
|
flex: 1 1 auto;
|
|
363
361
|
min-height: 0;
|
|
364
362
|
overflow-y: auto;
|
|
@@ -367,7 +365,7 @@ const oe = {
|
|
|
367
365
|
&::-webkit-scrollbar {
|
|
368
366
|
display: none;
|
|
369
367
|
}
|
|
370
|
-
`,
|
|
368
|
+
`, Se = u.div`
|
|
371
369
|
flex: 1 1 auto;
|
|
372
370
|
min-height: 0;
|
|
373
371
|
|
|
@@ -382,14 +380,14 @@ const oe = {
|
|
|
382
380
|
*::-webkit-scrollbar {
|
|
383
381
|
display: none;
|
|
384
382
|
}
|
|
385
|
-
`,
|
|
383
|
+
`, Ee = u.div`
|
|
386
384
|
display: flex;
|
|
387
385
|
align-items: center;
|
|
388
386
|
gap: 8px;
|
|
389
387
|
padding: 10px 12px;
|
|
390
388
|
flex-shrink: 0;
|
|
391
389
|
border-bottom: 1px solid ${o.stroke.primary};
|
|
392
|
-
`,
|
|
390
|
+
`, Ae = u.input`
|
|
393
391
|
flex: 1;
|
|
394
392
|
min-width: 0;
|
|
395
393
|
border: none;
|
|
@@ -402,7 +400,7 @@ const oe = {
|
|
|
402
400
|
&::placeholder {
|
|
403
401
|
color: ${o.content.placeholder};
|
|
404
402
|
}
|
|
405
|
-
`,
|
|
403
|
+
`, Le = u.button`
|
|
406
404
|
display: flex;
|
|
407
405
|
justify-content: space-between;
|
|
408
406
|
align-items: center;
|
|
@@ -424,32 +422,32 @@ const oe = {
|
|
|
424
422
|
&:hover {
|
|
425
423
|
background: ${o.surface.hovered};
|
|
426
424
|
}
|
|
427
|
-
`,
|
|
425
|
+
`, Ce = u.div`
|
|
428
426
|
display: flex;
|
|
429
427
|
align-items: center;
|
|
430
428
|
gap: 12px;
|
|
431
429
|
min-width: 0;
|
|
432
|
-
`,
|
|
430
|
+
`, $e = u.div`
|
|
433
431
|
display: flex;
|
|
434
432
|
align-items: center;
|
|
435
433
|
gap: 6px;
|
|
436
434
|
padding: 8px 12px;
|
|
437
435
|
border-top: 1px solid ${o.stroke.primary};
|
|
438
|
-
`,
|
|
436
|
+
`, Be = u.span`
|
|
439
437
|
flex-shrink: 0;
|
|
440
438
|
color: ${o.content.brand};
|
|
441
439
|
font-family: Inter;
|
|
442
440
|
font-size: 14px;
|
|
443
441
|
font-weight: 600;
|
|
444
442
|
white-space: nowrap;
|
|
445
|
-
`,
|
|
443
|
+
`, Oe = u.div`
|
|
446
444
|
width: 100%;
|
|
447
445
|
text-align: center;
|
|
448
446
|
color: ${o.content.brand};
|
|
449
447
|
font-family: Inter;
|
|
450
448
|
font-size: 14px;
|
|
451
449
|
font-weight: 600;
|
|
452
|
-
`,
|
|
450
|
+
`, Te = u.button`
|
|
453
451
|
display: flex;
|
|
454
452
|
align-items: center;
|
|
455
453
|
padding: 12px 16px;
|
|
@@ -464,13 +462,13 @@ const oe = {
|
|
|
464
462
|
box-sizing: border-box;
|
|
465
463
|
flex-shrink: 0;
|
|
466
464
|
gap: 4px;
|
|
467
|
-
`,
|
|
465
|
+
`, _e = u.div`
|
|
468
466
|
padding: 12px 10px;
|
|
469
467
|
font-family: Inter;
|
|
470
468
|
font-size: 13px;
|
|
471
469
|
color: ${o.content.secondary};
|
|
472
470
|
`;
|
|
473
471
|
export {
|
|
474
|
-
|
|
472
|
+
Xe as MentionPicker
|
|
475
473
|
};
|
|
476
474
|
//# sourceMappingURL=MentionPicker.js.map
|