@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.
Files changed (79) hide show
  1. package/dist/cjs/components/agent-builder/AgentBuilder.js +1 -1
  2. package/dist/cjs/components/agent-builder/AgentBuilder.js.map +1 -1
  3. package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js +1 -1
  4. package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
  5. package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js +1 -1
  6. package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
  7. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +5 -5
  8. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  9. package/dist/cjs/components/agent-builder/components/GoLiveModal.js +1 -1
  10. package/dist/cjs/components/agent-builder/components/GoLiveModal.js.map +1 -1
  11. package/dist/cjs/components/agent-builder/components/MentionPicker.js +24 -24
  12. package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
  13. package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js +1 -1
  14. package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
  15. package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js +2 -2
  16. package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
  17. package/dist/cjs/components/agent-builder/components/SelectableListSection.js +1 -1
  18. package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
  19. package/dist/cjs/components/agent-builder/constants/tools.js +1 -1
  20. package/dist/cjs/components/agent-builder/constants/tools.js.map +1 -1
  21. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
  22. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  23. package/dist/cjs/components/agent-builder/utils/sourceIcons.js +1 -1
  24. package/dist/cjs/components/agent-builder/utils/sourceIcons.js.map +1 -1
  25. package/dist/cjs/components/agent-listing/AgentTableRow.js +1 -1
  26. package/dist/cjs/components/agent-listing/AgentTableRow.js.map +1 -1
  27. package/dist/cjs/components/agent-listing/AiAgentsEmptyState.js +1 -1
  28. package/dist/cjs/components/agent-listing/AiAgentsEmptyState.js.map +1 -1
  29. package/dist/cjs/components/zeroState/ZeroState.js +3 -3
  30. package/dist/cjs/components/zeroState/ZeroState.js.map +1 -1
  31. package/dist/cjs/editor/BikEditor.js +1 -1
  32. package/dist/cjs/editor/BikEditor.js.map +1 -1
  33. package/dist/cjs/editor/BikEditor.styles.js +22 -16
  34. package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
  35. package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js +3 -3
  36. package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
  37. package/dist/esm/components/agent-builder/AgentBuilder.js +146 -136
  38. package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
  39. package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +7 -2
  40. package/dist/esm/components/agent-builder/components/AgentBuilderFooter.d.ts +2 -0
  41. package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js +29 -26
  42. package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
  43. package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js +30 -29
  44. package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
  45. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.d.ts +9 -0
  46. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +199 -184
  47. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  48. package/dist/esm/components/agent-builder/components/GoLiveModal.js +11 -13
  49. package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +1 -1
  50. package/dist/esm/components/agent-builder/components/MentionPicker.js +174 -150
  51. package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
  52. package/dist/esm/components/agent-builder/components/RequireVerificationModal.js +8 -8
  53. package/dist/esm/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
  54. package/dist/esm/components/agent-builder/components/RestApiToolPanel.js +54 -51
  55. package/dist/esm/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
  56. package/dist/esm/components/agent-builder/components/SelectableListSection.js +73 -69
  57. package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
  58. package/dist/esm/components/agent-builder/constants/tools.d.ts +20 -0
  59. package/dist/esm/components/agent-builder/constants/tools.js +34 -23
  60. package/dist/esm/components/agent-builder/constants/tools.js.map +1 -1
  61. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +270 -255
  62. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  63. package/dist/esm/components/agent-builder/utils/sourceIcons.d.ts +6 -6
  64. package/dist/esm/components/agent-builder/utils/sourceIcons.js +21 -19
  65. package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
  66. package/dist/esm/components/agent-listing/AgentTableRow.js +26 -23
  67. package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
  68. package/dist/esm/components/agent-listing/AiAgentsEmptyState.js +3 -2
  69. package/dist/esm/components/agent-listing/AiAgentsEmptyState.js.map +1 -1
  70. package/dist/esm/components/zeroState/ZeroState.d.ts +2 -0
  71. package/dist/esm/components/zeroState/ZeroState.js +18 -17
  72. package/dist/esm/components/zeroState/ZeroState.js.map +1 -1
  73. package/dist/esm/editor/BikEditor.js +236 -223
  74. package/dist/esm/editor/BikEditor.js.map +1 -1
  75. package/dist/esm/editor/BikEditor.styles.js +18 -12
  76. package/dist/esm/editor/BikEditor.styles.js.map +1 -1
  77. package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js +62 -60
  78. package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
  79. package/package.json +1 -1
@@ -1,205 +1,229 @@
1
- import { jsxs as k, jsx as s, Fragment as ee } from "react/jsx-runtime";
2
- import te from "../../../assets/icons/chevronRight.svg.js";
3
- import ne from "../../../assets/icons/searchIcon.svg.js";
4
- import oe from "../../../icons/Arrows/Normal arrows/ArrowLeft.js";
5
- import { useState as q, useMemo as y, useEffect as N, useRef as re } from "react";
6
- import p from "styled-components";
7
- import { TitleSmall as ie, BodySecondary as le, BodyCaption as ae } from "../../TypographyStyle.js";
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 ce, toolSourceRank as W, isIntegrationSource as se, CONFIG_TOOL_SOURCES as de } from "../constants/tools.js";
10
- import { toolSourceLabel as U } from "../utils/mentionSerialization.js";
11
- import { renderSourceIcon as X, sourceIcon as P } from "../utils/sourceIcons.js";
12
- import Y from "../../../icons/Informational/Common UI/Shield.js";
13
- const g = (a) => a.meta, R = (a) => g(a)?.plainLabel ?? a.label, ue = "__bik_create_subagent__", ze = ({
14
- items: a,
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: w,
18
- onCreateSubAgent: I,
19
- initialSource: j,
20
- toolActions: v,
21
- integrationStatus: F,
22
- onConnectIntegration: G
22
+ onClose: I,
23
+ onCreateSubAgent: R,
24
+ initialSource: Y,
25
+ toolActions: y,
26
+ integrationStatus: J,
27
+ onConnectIntegration: K
23
28
  }) => {
24
- const [Z, _] = q(null), [c, z] = q(j ?? null), [$, b] = q(-1), [S, J] = q(""), m = y(
25
- () => a.filter((e) => g(e)?.kind === "tool"),
26
- [a]
27
- ), A = y(
28
- () => a.filter((e) => g(e)?.kind === "subagent"),
29
- [a]
30
- ), O = y(() => {
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 m.forEach((o) => {
33
- const h = g(o)?.source ?? "other";
34
- e.includes(h) || e.push(h);
37
+ return x.forEach((o) => {
38
+ const f = m(o)?.source ?? "other";
39
+ e.includes(f) || e.push(f);
35
40
  }), e;
36
- }, [m]), D = y(
41
+ }, [x]), D = w(
37
42
  () => new Map(
38
- (v ?? []).map((e) => [e.source, e])
43
+ (y ?? []).map((e) => [e.source, e])
39
44
  ),
40
- [v]
41
- ), B = y(
42
- () => ce.filter(
43
- (e) => e.key === "tool" ? m.length > 0 || (v?.length ?? 0) > 0 : A.length > 0 || !!I
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
- [m.length, A.length, I, v?.length]
46
- ), M = B.length === 1 ? B[0].key : null, d = Z ?? M, u = d ? d === "subagent" ? (
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: M ? void 0 : () => _(null)
55
+ onBack: G ? void 0 : () => M(null)
51
56
  }
52
- ) : c ? {
53
- title: U(c),
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 clears the
56
- // source returning to the source chooser.
57
- onBack: j ? void 0 : () => z(null),
58
- icon: P(c)
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: M ? void 0 : () => _(null)
76
+ onBack: G ? void 0 : () => M(null)
65
77
  }
66
- ) : null, l = y(() => {
78
+ ) : null, a = w(() => {
67
79
  if (!d)
68
- return B.map((t) => ({
69
- id: t.key,
70
- label: t.label,
80
+ return _.map((n) => ({
81
+ id: n.key,
82
+ label: n.label,
71
83
  drillsIn: !0,
72
84
  onActivate: () => {
73
- _(t.key), z(null);
85
+ M(n.key), S(null);
74
86
  }
75
87
  }));
76
88
  if (d === "subagent") {
77
- const t = S.trim().toLowerCase(), f = A.filter((x) => !t || R(x).toLowerCase().includes(t)).map((x) => ({
78
- id: String(x.id),
79
- label: R(x),
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(x)
93
+ onActivate: () => C(g)
82
94
  }));
83
- return I && f.push({
84
- id: ue,
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
- w?.(), I();
101
+ I?.(), R();
90
102
  }
91
- }), f;
103
+ }), p;
92
104
  }
93
- if (!c) {
94
- const t = (v ?? []).map((n) => n.source).filter((n) => !O.includes(n)), f = [...O, ...t], x = (n) => {
95
- const i = D.get(n);
96
- if ((i !== void 0 ? i.connected : F?.[n]) === !1)
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: n,
99
- label: U(n),
110
+ id: t,
111
+ label: F(t),
100
112
  drillsIn: !1,
101
- icon: P(n) ?? i?.icon,
113
+ icon: z(t) ?? l?.icon,
102
114
  rightLabel: "Connect",
103
115
  onActivate: () => {
104
- w?.(), i?.onConnect ? i.onConnect() : G?.(n);
116
+ I?.(), l?.onConnect ? l.onConnect() : K?.(t);
105
117
  }
106
118
  };
107
- const V = m.filter(
108
- (E) => (g(E)?.source ?? "other") === n
119
+ const X = x.filter(
120
+ ($) => (m($)?.source ?? "other") === t
109
121
  );
110
- if (V.length + (i ? 1 : 0) === 1 && !(i === void 0 && se(n))) {
111
- const E = P(n) ?? i?.icon;
112
- if (i)
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: n,
115
- label: i.label,
126
+ id: t,
127
+ label: l.label,
116
128
  drillsIn: !1,
117
- icon: E,
129
+ icon: $,
118
130
  onActivate: () => {
119
- w?.(), i.onSelect();
131
+ I?.(), l.onSelect();
120
132
  }
121
133
  };
122
- const T = V[0];
134
+ const B = X[0];
123
135
  return {
124
- id: String(T.id),
125
- label: R(T),
136
+ id: String(B.id),
137
+ label: E(B),
126
138
  drillsIn: !1,
127
- icon: E,
128
- authRequired: g(T)?.authRequired,
129
- onActivate: () => C(T)
139
+ icon: $,
140
+ authRequired: m(B)?.authRequired,
141
+ onActivate: () => C(B)
130
142
  };
131
143
  }
132
144
  return {
133
- id: n,
134
- label: U(n),
145
+ id: t,
146
+ label: F(t),
135
147
  drillsIn: !0,
136
- icon: P(n) ?? i?.icon,
137
- onActivate: () => z(n)
148
+ icon: z(t) ?? l?.icon,
149
+ onActivate: () => S(t)
138
150
  };
139
151
  };
140
- return f.sort((n, i) => W(n) - W(i)).map(x);
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 = S.trim().toLowerCase(), o = m.filter((t) => (g(t)?.source ?? "other") === c).filter((t) => !e || R(t).toLowerCase().includes(e)).map((t) => ({
143
- id: String(t.id),
144
- label: R(t),
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: g(t)?.authRequired,
147
- onActivate: () => C(t)
148
- })), h = D.get(c);
149
- if (h) {
150
- const t = c in de;
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:${c}`,
153
- label: h.label,
176
+ id: `create:${i}`,
177
+ label: f.label,
154
178
  drillsIn: !1,
155
- isCreate: !t,
179
+ isCreate: !n,
156
180
  onActivate: () => {
157
- w?.(), h.onSelect();
181
+ I?.(), f.onSelect();
158
182
  }
159
183
  });
160
184
  }
161
185
  return o;
162
186
  }, [
163
187
  d,
164
- B,
165
- c,
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
- v,
196
+ R,
197
+ y,
174
198
  D,
175
- F,
176
- G
199
+ J,
200
+ K
177
201
  ]);
178
- N(() => b(-1), [d, c, S, a]), N(() => J(""), [d, c]);
179
- const Q = re({ rows: l, activeIndex: $, header: u });
180
- Q.current = { rows: l, activeIndex: $, header: u }, N(() => {
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: h, header: t } = Q.current;
207
+ const { rows: o, activeIndex: f, header: n } = V.current;
184
208
  switch (e.key) {
185
209
  case "ArrowDown":
186
- return o.length && b((f) => (f + 1) % o.length), !0;
210
+ return o.length && b((p) => (p + 1) % o.length), !0;
187
211
  case "ArrowUp":
188
- return o.length && b((f) => (f + o.length - 1) % o.length), !0;
212
+ return o.length && b((p) => (p + o.length - 1) % o.length), !0;
189
213
  case "ArrowRight":
190
214
  case "Enter":
191
- return (o[h] ?? o[0])?.onActivate(), !0;
215
+ return (o[f] ?? o[0])?.onActivate(), !0;
192
216
  case "ArrowLeft":
193
- return t?.onBack ? (t.onBack(), !0) : !1;
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 K = d ? l.length && !l[0].drillsIn ? "items" : "sources" : "categories", H = d === "tool" && !!c || d === "subagent";
200
- return /* @__PURE__ */ k(pe, { className: `bik-mention-picker bik-mention-picker--${K}`, children: [
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
- ve,
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
- oe,
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 && X(u.icon),
221
- /* @__PURE__ */ k(ie, { children: [
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
- H && /* @__PURE__ */ k(he, { children: [
252
+ re && /* @__PURE__ */ k(ve, { children: [
229
253
  /* @__PURE__ */ s(
230
- ne,
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
- fe,
262
+ ye,
239
263
  {
240
264
  autoFocus: !0,
241
- value: S,
265
+ value: A,
242
266
  placeholder: "Search",
243
267
  "data-test": "mention-picker-search",
244
- onChange: (e) => J(e.target.value),
268
+ onChange: (e) => Q(e.target.value),
245
269
  onKeyDown: (e) => {
246
- l.length && (e.key === "ArrowDown" ? (e.preventDefault(), b((o) => (o + 1) % l.length)) : e.key === "ArrowUp" ? (e.preventDefault(), b((o) => (o + l.length - 1) % l.length)) : e.key === "Enter" && (e.preventDefault(), (l[$] ?? l[0])?.onActivate()));
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
- l.length === 0 ? /* @__PURE__ */ s(ye, { children: d === "subagent" ? null : "No tools available" }) : l.map((e, o) => /* @__PURE__ */ s(
252
- ge,
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(ke, { children: e.label }) : /* @__PURE__ */ k(ee, { children: [
260
- /* @__PURE__ */ k(be, { children: [
261
- X(e.icon),
262
- /* @__PURE__ */ s(le, { color: r.content.primary, children: e.label }),
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
- Y,
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(xe, { children: e.rightLabel }) : e.drillsIn && /* @__PURE__ */ s(te, { width: 12, height: 12 })
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
- l.some((e) => e.authRequired) && /* @__PURE__ */ k(me, { children: [
277
- /* @__PURE__ */ s(Y, { size: 16 }),
278
- /* @__PURE__ */ s(ae, { color: r.content.secondary, children: "This tool requires customer verification" })
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
- }, pe = p.div`
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
- `, he = p.div`
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
- `, fe = p.input`
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
- `, ge = p.button`
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: ${(a) => a.$active ? r.surface.subdued : "transparent"};
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
- `, be = p.div`
357
+ `, Ie = h.div`
334
358
  display: flex;
335
359
  align-items: center;
336
360
  gap: 12px;
337
361
  min-width: 0;
338
- `, me = p.div`
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
- `, xe = p.span`
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
- `, ke = p.div`
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
- `, ve = p.button`
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
- `, ye = p.div`
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
- ze as MentionPicker
404
+ Fe as MentionPicker
381
405
  };
382
406
  //# sourceMappingURL=MentionPicker.js.map