@bikdotai/bik-component-library 0.0.863-beta.6 → 0.0.863
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 +42 -174
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionPicker.js +1 -1
- 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/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/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/Step4HandoverRules.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js.map +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/index.js +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.js +99 -105
- 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 -91
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js +93 -271
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.js +27 -27
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +42 -34
- 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/constants/tools.d.ts +6 -5
- package/dist/esm/components/agent-builder/constants/tools.js +24 -21
- package/dist/esm/components/agent-builder/constants/tools.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 +175 -192
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/esm/components/agent-builder/index.d.ts +2 -7
- 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 +49 -54
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.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/sourceIcons.d.ts +4 -0
- package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentTableRow.js +38 -71
- package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/esm/index.js +634 -644
- package/dist/esm/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/cjs/components/agent-builder/components/AgentStateModal.js +0 -2
- package/dist/cjs/components/agent-builder/components/AgentStateModal.js.map +0 -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/AgentStateModal.d.ts +0 -47
- package/dist/esm/components/agent-builder/components/AgentStateModal.js +0 -82
- package/dist/esm/components/agent-builder/components/AgentStateModal.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
|
@@ -3,19 +3,20 @@ import ie from "../../../assets/icons/delete.svg.js";
|
|
|
3
3
|
import de from "../../../assets/icons/edit.svg.js";
|
|
4
4
|
import Q from "../../../assets/icons/plus.svg.js";
|
|
5
5
|
import { useState as m, useRef as U, useEffect as se } from "react";
|
|
6
|
-
import
|
|
7
|
-
import { TitleSmall as ae, BodyCaption as $, BodySecondary as
|
|
6
|
+
import D from "styled-components";
|
|
7
|
+
import { TitleSmall as ae, BodyCaption as $, BodySecondary as I } from "../../TypographyStyle.js";
|
|
8
8
|
import { COLORS as d } from "../../../constants/Theme.js";
|
|
9
9
|
import { SideSection as ue, SideSectionHeader as he, AddIconButton as fe, SourceButtonRow as pe, SourceButton as X, SelectableRow as me, RowLabel as Se, RowText as be, RowActions as ve, RowMenuButton as Y, RowActionDivider as ye } from "../AgentBuilder.styled.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { isIntegrationSource as we } from "../constants/tools.js";
|
|
11
|
+
import { renderSourceIcon as R, sourceIcon as $e } from "../utils/sourceIcons.js";
|
|
12
|
+
import { MentionPicker as ge } from "./MentionPicker.js";
|
|
12
13
|
import { Dropdown as Z } from "../../dropdown/Dropdown.js";
|
|
13
14
|
import { unwrapDropdownValue as P } from "../../dropdown/utils.js";
|
|
14
|
-
import { Button as
|
|
15
|
-
import { DeleteConfirmationModal as
|
|
15
|
+
import { Button as Ce } from "../../button/Button.js";
|
|
16
|
+
import { DeleteConfirmationModal as ke } from "../../states-modal/DeleteConfirmationModal.js";
|
|
16
17
|
import { Tooltip as g } from "../../tooltips/Tooltip.js";
|
|
17
|
-
import
|
|
18
|
-
const G = "__bik_create_new__",
|
|
18
|
+
import Ee from "../../../icons/Informational/Common UI/Shield.js";
|
|
19
|
+
const G = "__bik_create_new__", Ue = ({
|
|
19
20
|
title: s,
|
|
20
21
|
helper: _,
|
|
21
22
|
items: u,
|
|
@@ -32,7 +33,7 @@ const G = "__bik_create_new__", Je = ({
|
|
|
32
33
|
confirmDelete: p,
|
|
33
34
|
pickerOpensUp: z
|
|
34
35
|
}) => {
|
|
35
|
-
const [f, l] = m(!1), [x, k] = m(null), [H, M] = m(null), [ee, E] = m(null), y = !!h && h.length > 0,
|
|
36
|
+
const [f, l] = m(!1), [x, k] = m(null), [H, M] = m(null), [ee, E] = m(null), y = !!h && h.length > 0, A = h?.find((e) => e.source === ee), c = C !== void 0, j = U(null), q = U(null), [w, W] = m(null);
|
|
36
37
|
se(() => {
|
|
37
38
|
if (!c || !f)
|
|
38
39
|
return;
|
|
@@ -76,19 +77,26 @@ const G = "__bik_create_new__", Je = ({
|
|
|
76
77
|
{
|
|
77
78
|
"data-test": `${r}-row-${e.id}`,
|
|
78
79
|
children: [
|
|
79
|
-
|
|
80
|
+
R(e.icon),
|
|
80
81
|
/* @__PURE__ */ i(Se, { children: [
|
|
81
|
-
/* @__PURE__ */ n(g, { body: e.label, placement: "top", children: /* @__PURE__ */ n(be, { children: /* @__PURE__ */ n(
|
|
82
|
+
/* @__PURE__ */ n(g, { body: e.label, placement: "top", children: /* @__PURE__ */ n(be, { children: /* @__PURE__ */ n(I, { numberOfLines: 1, color: d.content.primary, children: e.label }) }) }),
|
|
82
83
|
e.authRequired && // Order tools touch customer-private data — the shield flags that
|
|
83
84
|
// this agent must verify the customer before the tool can run.
|
|
84
|
-
/* @__PURE__ */ n(
|
|
85
|
-
|
|
85
|
+
/* @__PURE__ */ n(
|
|
86
|
+
g,
|
|
86
87
|
{
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
children: /* @__PURE__ */ n(
|
|
88
|
+
body: "This tool requires customer verification",
|
|
89
|
+
placement: "top",
|
|
90
|
+
children: /* @__PURE__ */ n(
|
|
91
|
+
"span",
|
|
92
|
+
{
|
|
93
|
+
"data-test": `${r}-auth-${e.id}`,
|
|
94
|
+
style: { display: "inline-flex", flexShrink: 0 },
|
|
95
|
+
children: /* @__PURE__ */ n(Ee, { size: 16 })
|
|
96
|
+
}
|
|
97
|
+
)
|
|
90
98
|
}
|
|
91
|
-
)
|
|
99
|
+
)
|
|
92
100
|
] }),
|
|
93
101
|
/* @__PURE__ */ i(ve, { children: [
|
|
94
102
|
o && // Configurable rows (sub-agents, Rest API / email tools) get an
|
|
@@ -154,7 +162,7 @@ const G = "__bik_create_new__", Je = ({
|
|
|
154
162
|
)
|
|
155
163
|
}
|
|
156
164
|
] : S, N = c ? /* @__PURE__ */ n(
|
|
157
|
-
|
|
165
|
+
ge,
|
|
158
166
|
{
|
|
159
167
|
items: C ?? [],
|
|
160
168
|
query: "",
|
|
@@ -185,7 +193,7 @@ const G = "__bik_create_new__", Je = ({
|
|
|
185
193
|
return /* @__PURE__ */ i(ue, { children: [
|
|
186
194
|
/* @__PURE__ */ i(he, { children: [
|
|
187
195
|
/* @__PURE__ */ n(ae, { color: d.content.primary, children: s }),
|
|
188
|
-
ne && /* @__PURE__ */ i(
|
|
196
|
+
ne && /* @__PURE__ */ i(Ae, { ref: j, children: [
|
|
189
197
|
/* @__PURE__ */ n(
|
|
190
198
|
fe,
|
|
191
199
|
{
|
|
@@ -206,10 +214,10 @@ const G = "__bik_create_new__", Je = ({
|
|
|
206
214
|
] })
|
|
207
215
|
] }),
|
|
208
216
|
_ && /* @__PURE__ */ n($, { color: d.content.secondary, children: _ }),
|
|
209
|
-
te ? /* @__PURE__ */ i(
|
|
217
|
+
te ? /* @__PURE__ */ i(Ie, { ref: c ? q : void 0, children: [
|
|
210
218
|
/* @__PURE__ */ i(pe, { "data-test": `${r}-sources`, children: [
|
|
211
219
|
h?.map((e) => {
|
|
212
|
-
const o = e.connected !== !1 && e.options.length === 1 ? e.options[0] : void 0;
|
|
220
|
+
const o = e.connected !== !1 && e.options.length === 1 && !we(e.source) ? e.options[0] : void 0;
|
|
213
221
|
return /* @__PURE__ */ i(
|
|
214
222
|
X,
|
|
215
223
|
{
|
|
@@ -231,11 +239,11 @@ const G = "__bik_create_new__", Je = ({
|
|
|
231
239
|
E(e.source);
|
|
232
240
|
},
|
|
233
241
|
children: [
|
|
234
|
-
|
|
242
|
+
R($e(e.source), -4),
|
|
235
243
|
/* @__PURE__ */ n($, { color: d.content.primary, children: o ? o.label : e.label }),
|
|
236
244
|
e.connected === !1 && // Not connected → show "Connect" upfront (consistent with
|
|
237
245
|
// the `@` picker); clicking runs the connect flow.
|
|
238
|
-
/* @__PURE__ */ n(
|
|
246
|
+
/* @__PURE__ */ n(I, { color: d.content.brand, children: "Connect" })
|
|
239
247
|
]
|
|
240
248
|
},
|
|
241
249
|
e.source
|
|
@@ -250,11 +258,11 @@ const G = "__bik_create_new__", Je = ({
|
|
|
250
258
|
l(!1), e.onSelect();
|
|
251
259
|
},
|
|
252
260
|
children: [
|
|
253
|
-
|
|
261
|
+
R(e.icon, -4),
|
|
254
262
|
/* @__PURE__ */ n($, { color: d.content.primary, children: e.label }),
|
|
255
263
|
e.connected === !1 && // Not connected → "Connect" upfront (consistent with the
|
|
256
264
|
// source buttons and the `@` picker).
|
|
257
|
-
/* @__PURE__ */ n(
|
|
265
|
+
/* @__PURE__ */ n(I, { color: d.content.brand, children: "Connect" })
|
|
258
266
|
]
|
|
259
267
|
},
|
|
260
268
|
e.source
|
|
@@ -269,15 +277,15 @@ const G = "__bik_create_new__", Je = ({
|
|
|
269
277
|
children: N
|
|
270
278
|
}
|
|
271
279
|
),
|
|
272
|
-
!c &&
|
|
280
|
+
!c && A && /* @__PURE__ */ n(
|
|
273
281
|
Z,
|
|
274
282
|
{
|
|
275
283
|
"data-test": `${r}-dropdown`,
|
|
276
284
|
size: "small",
|
|
277
285
|
width: "100%",
|
|
278
286
|
isSearchable: !0,
|
|
279
|
-
placeHolder: `Search ${
|
|
280
|
-
options:
|
|
287
|
+
placeHolder: `Search ${A.label} tools`,
|
|
288
|
+
options: A.options,
|
|
281
289
|
onSelect: (e) => {
|
|
282
290
|
const o = P(e);
|
|
283
291
|
E(null), l(!1), o && b(o);
|
|
@@ -303,7 +311,7 @@ const G = "__bik_create_new__", Je = ({
|
|
|
303
311
|
u.length === 0 && !f ? /* @__PURE__ */ i(J, { children: [
|
|
304
312
|
/* @__PURE__ */ n($, { color: d.content.placeholder, children: O }),
|
|
305
313
|
oe && t && /* @__PURE__ */ n(
|
|
306
|
-
|
|
314
|
+
Ce,
|
|
307
315
|
{
|
|
308
316
|
"data-test": `${r}-create`,
|
|
309
317
|
buttonType: "secondary",
|
|
@@ -317,7 +325,7 @@ const G = "__bik_create_new__", Je = ({
|
|
|
317
325
|
] }) : ce()
|
|
318
326
|
] }),
|
|
319
327
|
p && x && /* @__PURE__ */ n(
|
|
320
|
-
|
|
328
|
+
ke,
|
|
321
329
|
{
|
|
322
330
|
"data-test": `${r}-delete-confirm`,
|
|
323
331
|
header: `Delete this ${p.noun}?`,
|
|
@@ -331,21 +339,21 @@ const G = "__bik_create_new__", Je = ({
|
|
|
331
339
|
}
|
|
332
340
|
)
|
|
333
341
|
] });
|
|
334
|
-
},
|
|
342
|
+
}, Ae = D.div`
|
|
335
343
|
position: relative;
|
|
336
344
|
display: flex;
|
|
337
|
-
`,
|
|
345
|
+
`, Ie = D.div`
|
|
338
346
|
position: relative;
|
|
339
347
|
display: flex;
|
|
340
348
|
flex-direction: column;
|
|
341
349
|
gap: 8px;
|
|
342
|
-
`, T =
|
|
350
|
+
`, T = D.div`
|
|
343
351
|
position: absolute;
|
|
344
352
|
${(s) => s.$up ? "bottom: calc(100% + 4px);" : "top: calc(100% + 4px);"}
|
|
345
353
|
${(s) => s.$align === "left" ? "left: 0;" : "right: 0;"}
|
|
346
354
|
z-index: 30;
|
|
347
355
|
`;
|
|
348
356
|
export {
|
|
349
|
-
|
|
357
|
+
Ue as SelectableListSection
|
|
350
358
|
};
|
|
351
359
|
//# sourceMappingURL=SelectableListSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectableListSection.js","sources":["../../../../../src/components/agent-builder/components/SelectableListSection.tsx"],"sourcesContent":["import DeleteIcon from '@src/assets/icons/delete.svg';\nimport EditIcon from '@src/assets/icons/edit.svg';\nimport PlusIcon from '@src/assets/icons/plus.svg';\nimport { MentionItem } from '@src/editor';\nimport { Shield } from '@src/icons';\nimport React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '@src/components/button';\nimport { Dropdown, unwrapDropdownValue } from '@src/components/dropdown';\nimport { SingleOption } from '@src/components/dropdown/type';\nimport { DeleteConfirmationModal } from '@src/components/states-modal';\nimport { Tooltip } from '@src/components/tooltips';\nimport {\n\tBodyCaption,\n\tBodySecondary,\n\tTitleSmall,\n} from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport {\n\tAddIconButton,\n\tRowActionDivider,\n\tRowActions,\n\tRowLabel,\n\tRowMenuButton,\n\tRowText,\n\tSelectableRow,\n\tSideSection,\n\tSideSectionHeader,\n\tSourceButton,\n\tSourceButtonRow,\n} from '../AgentBuilder.styled';\nimport { ToolAction } from '../constants/tools';\nimport { renderSourceIcon, sourceIcon, SourceIcon } from '../utils/sourceIcons';\nimport { MentionPicker } from './MentionPicker';\n\nexport interface SelectableItem {\n\tid: string;\n\tlabel: string;\n\t/** Leading brand glyph (e.g. a tool's source icon). */\n\ticon?: SourceIcon;\n\t/**\n\t * True when the tool touches customer-private data and the agent must verify\n\t * the customer first (backend `auth_required`). Shows a shield glyph on the row.\n\t */\n\tauthRequired?: boolean;\n\t/**\n\t * When set, this row shows an edit (Configure) icon that calls this instead of\n\t * the section-level `onConfigure`. Use for rows that open their own drawer\n\t * (e.g. a configured Rest API / email-handover tool). A pending promise\n\t * disables the row's edit button until it settles (e.g. while the consumer\n\t * fetches the sub-agent's data before opening its drawer).\n\t */\n\tonConfigure?: () => void | Promise<void>;\n}\n\n/** A tool source for the empty-state picker (Tools): a button → its searchable list. */\nexport interface SourceGroup {\n\tsource: string;\n\tlabel: string;\n\toptions: SingleOption[];\n\t/**\n\t * Integration connection state for this source. `false` = the store hasn't\n\t * connected it → clicking the source button calls {@link onConnect} instead of\n\t * opening its tool list. `true`/absent → opens normally.\n\t */\n\tconnected?: boolean;\n\t/** Open the connect flow for this source (used when `connected === false`). */\n\tonConnect?: () => void;\n}\n\n/** Sentinel value for the \"create new\" entry in the add dropdown. */\nconst CREATE_OPTION_VALUE = '__bik_create_new__';\n\ninterface SelectableListSectionProps {\n\ttitle: string;\n\thelper?: string;\n\titems: SelectableItem[];\n\t/**\n\t * Options shown in the add dropdown. Pass ALL items (not just unselected\n\t * ones) when re-picking an already-added item is allowed (e.g. to insert its\n\t * mention again) — the chip list still shows each item only once.\n\t */\n\taddableOptions: SingleOption[];\n\tonAdd: (id: string) => void;\n\tonRemove: (id: string) => void;\n\tdataTestPrefix: string;\n\temptyText: string;\n\t/**\n\t * Adds a \"create new\" entry at the top of the add dropdown (e.g. \"Create\n\t * sub-agent\"). Selecting it calls `onSelect` instead of `onAdd`.\n\t */\n\tcreateOption?: { label: string; onSelect: () => void };\n\t/**\n\t * When provided, each row shows an edit (Configure) icon next to Delete.\n\t * Omit for tools (Delete only). A pending promise disables the edit buttons\n\t * until it settles.\n\t */\n\tonConfigure?: (id: string) => void | Promise<void>;\n\t/**\n\t * Tool sources (e.g. Manifest / Shopify). When set, the empty state shows a\n\t * button per source; clicking one reveals a searchable dropdown of just that\n\t * source's options. Selecting calls `onAdd`. Takes precedence over the plain\n\t * `addableOptions` dropdown.\n\t */\n\tsourceGroups?: SourceGroup[];\n\t/**\n\t * When provided, the header \"+\" opens the same `@` reference picker used in the\n\t * Instructions editor (a {@link MentionPicker} popover) instead of the inline\n\t * select dropdown. Pass the items for THIS section only (tools OR sub-agents) —\n\t * the picker auto-drills into the single category. Selecting a row calls\n\t * `onAdd(id)`; the picker's \"Create new\" row (sub-agents) calls\n\t * `createOption.onSelect`.\n\t */\n\tmentionItems?: MentionItem[];\n\t/**\n\t * Built-in \"action\" tools (e.g. Rest API / Handover to email) that open a\n\t * config drawer via `onSelect` instead of adding a mention. Shown as\n\t * empty-state source buttons (only while no items exist, alongside\n\t * `sourceGroups`) AND as rows inside the `@` picker's Tools view.\n\t */\n\tactionSources?: ToolAction[];\n\t/**\n\t * When set, the row Delete icon opens a confirmation modal (instead of\n\t * removing immediately); `onRemove` runs only on confirm. `noun` fills the one\n\t * shared message template (\"Delete this <noun>?\" …); `zIndex` raises the modal\n\t * above a parent drawer. Omit to delete directly.\n\t */\n\tconfirmDelete?: { noun: string; zIndex?: number };\n\t/**\n\t * Open the `@` picker popover above the trigger instead of below. Use inside\n\t * a drawer where the section sits near the bottom — opening downward\n\t * stretches the drawer and leaves a gap.\n\t */\n\tpickerOpensUp?: boolean;\n}\n\nexport const SelectableListSection: React.FC<SelectableListSectionProps> = ({\n\ttitle,\n\thelper,\n\titems,\n\taddableOptions,\n\tonAdd,\n\tonRemove,\n\tdataTestPrefix,\n\temptyText,\n\tcreateOption,\n\tonConfigure,\n\tsourceGroups,\n\tmentionItems,\n\tactionSources,\n\tconfirmDelete,\n\tpickerOpensUp,\n}) => {\n\tconst [adding, setAdding] = useState(false);\n\t// Row id awaiting delete confirmation (null = modal closed).\n\tconst [pendingDeleteId, setPendingDeleteId] = useState<string | null>(null);\n\t// Row id whose configure handler is in flight (async fetch before its drawer\n\t// opens) — all edit buttons are disabled meanwhile so the UI isn't\n\t// unresponsive to double clicks.\n\tconst [configuringId, setConfiguringId] = useState<string | null>(null);\n\t// Tools: which source's searchable list is open (null = just show the buttons).\n\tconst [activeSource, setActiveSource] = useState<string | null>(null);\n\tconst hasSourceGroups = !!sourceGroups && sourceGroups.length > 0;\n\tconst activeGroup = sourceGroups?.find((g) => g.source === activeSource);\n\t// When set, \"+\" opens the `@` MentionPicker popover instead of a select input.\n\tconst usePicker = mentionItems !== undefined;\n\t// Separate anchors for the header \"+\" popover and the empty-state source-button\n\t// popover — when empty both render at once, so a shared ref would misfire the\n\t// outside-click check (closing the header picker when a source row is clicked).\n\tconst headerPickerRef = useRef<HTMLDivElement>(null);\n\tconst sourcePickerRef = useRef<HTMLDivElement>(null);\n\t// Source (Shopify / Manifest) the empty-state button opened the picker into;\n\t// null when \"+\" opened it at the root source list.\n\tconst [pickerSource, setPickerSource] = useState<string | null>(null);\n\n\t// Dismiss the picker popover on outside click / Escape.\n\tuseEffect(() => {\n\t\tif (!usePicker || !adding) {\n\t\t\treturn;\n\t\t}\n\t\tconst onDocMouseDown = (e: MouseEvent) => {\n\t\t\tconst target = e.target as Node;\n\t\t\tif (\n\t\t\t\t!headerPickerRef.current?.contains(target) &&\n\t\t\t\t!sourcePickerRef.current?.contains(target)\n\t\t\t) {\n\t\t\t\tsetAdding(false);\n\t\t\t}\n\t\t};\n\t\tconst onKeyDown = (e: KeyboardEvent) => {\n\t\t\tif (e.key === 'Escape') {\n\t\t\t\tsetAdding(false);\n\t\t\t}\n\t\t};\n\t\tdocument.addEventListener('mousedown', onDocMouseDown);\n\t\tdocument.addEventListener('keydown', onKeyDown);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('mousedown', onDocMouseDown);\n\t\t\tdocument.removeEventListener('keydown', onKeyDown);\n\t\t};\n\t}, [usePicker, adding]);\n\n\t// Header \"+\" picks an EXISTING item (and, once some exist, re-creates via the\n\t// dropdown's footer row). With an empty list + a createOption the body shows a\n\t// dedicated \"Create new\" button instead, so the header \"+\" would be redundant.\n\t// In picker mode the \"+\" always shows (even empty) — for tools it sits next to\n\t// the empty-state source buttons; the create flow lives inside the picker.\n\tconst showAddButton = hasSourceGroups\n\t\t? usePicker || items.length > 0\n\t\t: usePicker ||\n\t\t addableOptions.length > 0 ||\n\t\t (!!createOption && items.length > 0);\n\t// Empty state offers a one-click \"Create new\" (sub-agents) rather than burying\n\t// it behind a single-item dropdown. In picker mode the \"+\" opens the picker\n\t// (with its own \"Create new\" row) instead, so skip the standalone button.\n\tconst showEmptyCreate =\n\t\titems.length === 0 && !!createOption && !hasSourceGroups && !usePicker;\n\tconst hasActionSources = !!actionSources && actionSources.length > 0;\n\t// Source buttons ONLY while no item is added — the tool sources (Manifest /\n\t// Shopify …) plus the built-in action tools (Rest API / Handover to email).\n\t// Once an item exists, adding more uses the header \"+\" → picker (the buttons\n\t// never come back); the action tools still live inside that picker.\n\tconst showSourceButtons =\n\t\t(hasSourceGroups || hasActionSources) && items.length === 0;\n\t// Nothing existing to pick → skip the 1-item dropdown and create directly.\n\tconst handleAddClick = () => {\n\t\tif (usePicker) {\n\t\t\t// Nothing to pick yet and a create flow exists (e.g. Sub-agents with none\n\t\t\t// added) → skip the empty picker and open the create drawer directly,\n\t\t\t// mirroring the single-tool \"one level up\" collapse.\n\t\t\tif ((mentionItems?.length ?? 0) === 0 && createOption) {\n\t\t\t\tcreateOption.onSelect();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Toggle the `@` reference-picker popover (rendered under the \"+\"), opened\n\t\t\t// at the root source list (no pre-drilled source).\n\t\t\tsetPickerSource(null);\n\t\t\tsetAdding((v) => !v);\n\t\t\treturn;\n\t\t}\n\t\tif (hasSourceGroups) {\n\t\t\tsetActiveSource(null);\n\t\t\tsetAdding((v) => !v);\n\t\t\treturn;\n\t\t}\n\t\tif (addableOptions.length === 0 && createOption) {\n\t\t\tcreateOption.onSelect();\n\t\t\treturn;\n\t\t}\n\t\tsetAdding((v) => !v);\n\t};\n\n\t// Run a row's configure handler; a returned promise disables the edit\n\t// buttons until it settles (same promise-sniff as the drawer Save buttons).\n\tconst handleConfigureClick = (\n\t\tid: string,\n\t\tconfigure: () => void | Promise<void>,\n\t) => {\n\t\tif (configuringId) {\n\t\t\treturn;\n\t\t}\n\t\tconst result = configure();\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetConfiguringId(id);\n\t\t\tvoid (result as Promise<void>).finally(() => setConfiguringId(null));\n\t\t}\n\t};\n\n\tconst renderChipRows = () =>\n\t\titems.map((item) => {\n\t\t\t// Per-item configure wins; otherwise fall back to the section-level one.\n\t\t\tconst configure =\n\t\t\t\titem.onConfigure ??\n\t\t\t\t(onConfigure ? () => onConfigure(item.id) : undefined);\n\t\t\treturn (\n\t\t\t\t<SelectableRow\n\t\t\t\t\tkey={item.id}\n\t\t\t\t\tdata-test={`${dataTestPrefix}-row-${item.id}`}\n\t\t\t\t>\n\t\t\t\t\t{renderSourceIcon(item.icon)}\n\t\t\t\t\t{/* Label + verification shield on one row: label truncates, the shield\n\t\t\t\t\t sits just after the text. */}\n\t\t\t\t\t<RowLabel>\n\t\t\t\t\t\t{/* Row label truncates to one line; tooltip surfaces the full name. */}\n\t\t\t\t\t\t<Tooltip body={item.label} placement=\"top\">\n\t\t\t\t\t\t\t<RowText>\n\t\t\t\t\t\t\t\t<BodySecondary numberOfLines={1} color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t</RowText>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t{item.authRequired && (\n\t\t\t\t\t\t\t// Order tools touch customer-private data — the shield flags that\n\t\t\t\t\t\t\t// this agent must verify the customer before the tool can run.\n\t\t\t\t\t\t\t<Tooltip body=\"Requires customer verification\" placement=\"top\">\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-auth-${item.id}`}\n\t\t\t\t\t\t\t\t\tstyle={{ display: 'inline-flex', flexShrink: 0 }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Shield size={16} />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</RowLabel>\n\t\t\t\t\t<RowActions>\n\t\t\t\t\t\t{configure && (\n\t\t\t\t\t\t\t// Configurable rows (sub-agents, Rest API / email tools) get an\n\t\t\t\t\t\t\t// always-visible edit icon.\n\t\t\t\t\t\t\t<Tooltip body=\"Edit\" placement=\"top\">\n\t\t\t\t\t\t\t\t<RowMenuButton\n\t\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-edit-${item.id}`}\n\t\t\t\t\t\t\t\t\taria-label={`Edit ${item.label}`}\n\t\t\t\t\t\t\t\t\tdisabled={configuringId !== null}\n\t\t\t\t\t\t\t\t\tonClick={() => handleConfigureClick(item.id, configure)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EditIcon\n\t\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</RowMenuButton>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{configure && <RowActionDivider aria-hidden />}\n\t\t\t\t\t\t<Tooltip body=\"Delete\" placement=\"top\">\n\t\t\t\t\t\t\t<RowMenuButton\n\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-delete-${item.id}`}\n\t\t\t\t\t\t\t\taria-label={`Delete ${item.label}`}\n\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\tconfirmDelete\n\t\t\t\t\t\t\t\t\t\t? setPendingDeleteId(item.id)\n\t\t\t\t\t\t\t\t\t\t: onRemove(item.id)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DeleteIcon\n\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</RowMenuButton>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t</RowActions>\n\t\t\t\t</SelectableRow>\n\t\t\t);\n\t\t});\n\t// \"Create new\" is a brand-coloured footer row at the BOTTOM of the dropdown,\n\t// separated from the selectable items by a divider.\n\tconst dropdownOptions: SingleOption[] = createOption\n\t\t? [\n\t\t\t\t...addableOptions,\n\t\t\t\t{\n\t\t\t\t\tlabel: createOption.label,\n\t\t\t\t\tvalue: CREATE_OPTION_VALUE,\n\t\t\t\t\tsearchKey: createOption.label,\n\t\t\t\t\tcustomComponent: (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\t\t\t\tcolor: COLORS.content.brand,\n\t\t\t\t\t\t\t\tfontFamily: 'Inter',\n\t\t\t\t\t\t\t\tfontSize: 14,\n\t\t\t\t\t\t\t\tfontWeight: 600,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{createOption.label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t ]\n\t\t: addableOptions;\n\n\t// One picker instance reused by the header \"+\" and the empty-state source\n\t// buttons. `key` remounts it so a source button re-drills into its own tools\n\t// (the initial drill-in level is read once, on mount).\n\tconst pickerNode = usePicker ? (\n\t\t<MentionPicker\n\t\t\tkey={pickerSource ?? '__root__'}\n\t\t\titems={mentionItems ?? []}\n\t\t\tquery=\"\"\n\t\t\tactiveIndex={0}\n\t\t\tinitialSource={pickerSource ?? undefined}\n\t\t\tonSelect={(item) => {\n\t\t\t\tsetAdding(false);\n\t\t\t\tonAdd(String(item.id));\n\t\t\t}}\n\t\t\tonClose={() => setAdding(false)}\n\t\t\tonCreateSubAgent={\n\t\t\t\tcreateOption\n\t\t\t\t\t? () => {\n\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\tcreateOption.onSelect();\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\ttoolActions={\n\t\t\t\thasActionSources\n\t\t\t\t\t? actionSources?.map((a) => ({\n\t\t\t\t\t\t\t...a,\n\t\t\t\t\t\t\tonSelect: () => {\n\t\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\t\ta.onSelect();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t }))\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\t// Gate native source rows in the picker on their connected state, derived\n\t\t\t// from the source groups (which already carry connected/onConnect). This is\n\t\t\t// what makes the \"+\" dropdown show \"Connect\" for unconnected vendors,\n\t\t\t// consistent with the empty-state buttons.\n\t\t\tintegrationStatus={Object.fromEntries(\n\t\t\t\t(sourceGroups ?? [])\n\t\t\t\t\t.filter((g) => g.connected !== undefined)\n\t\t\t\t\t.map((g) => [g.source, g.connected]),\n\t\t\t)}\n\t\t\tonConnectIntegration={(source) => {\n\t\t\t\tsetAdding(false);\n\t\t\t\tsourceGroups?.find((g) => g.source === source)?.onConnect?.();\n\t\t\t}}\n\t\t/>\n\t) : null;\n\n\treturn (\n\t\t<SideSection>\n\t\t\t<SideSectionHeader>\n\t\t\t\t<TitleSmall color={COLORS.content.primary}>{title}</TitleSmall>\n\t\t\t\t{showAddButton && (\n\t\t\t\t\t<AddButtonWrap ref={headerPickerRef}>\n\t\t\t\t\t\t<AddIconButton\n\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-add`}\n\t\t\t\t\t\t\tonClick={handleAddClick}\n\t\t\t\t\t\t\taria-label={`Add ${title}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PlusIcon width={16} height={16} color={COLORS.content.primary} />\n\t\t\t\t\t\t</AddIconButton>\n\t\t\t\t\t\t{usePicker && adding && pickerSource === null && (\n\t\t\t\t\t\t\t<PickerPopover\n\t\t\t\t\t\t\t\t$up={pickerOpensUp}\n\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-picker`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{pickerNode}\n\t\t\t\t\t\t\t</PickerPopover>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</AddButtonWrap>\n\t\t\t\t)}\n\t\t\t</SideSectionHeader>\n\n\t\t\t{helper && (\n\t\t\t\t<BodyCaption color={COLORS.content.secondary}>{helper}</BodyCaption>\n\t\t\t)}\n\n\t\t\t{showSourceButtons ? (\n\t\t\t\t<SourcePickerAnchor ref={usePicker ? sourcePickerRef : undefined}>\n\t\t\t\t\t{/* No tools yet: one button per source (never shown once a tool exists). */}\n\t\t\t\t\t<SourceButtonRow data-test={`${dataTestPrefix}-sources`}>\n\t\t\t\t\t\t{sourceGroups?.map((g) => {\n\t\t\t\t\t\t\t// A connected source with exactly one tool is pointless to drill\n\t\t\t\t\t\t\t// into — surface that single tool right here (its name + the source\n\t\t\t\t\t\t\t// icon) and add it on click, mirroring the `@` picker's single-leaf\n\t\t\t\t\t\t\t// collapse. Connect still wins when the source isn't connected.\n\t\t\t\t\t\t\tconst soleTool =\n\t\t\t\t\t\t\t\tg.connected !== false && g.options.length === 1\n\t\t\t\t\t\t\t\t\t? g.options[0]\n\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<SourceButton\n\t\t\t\t\t\t\t\t\tkey={g.source}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-source-${g.source}`}\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t// Not connected → open the connect flow instead of the tools.\n\t\t\t\t\t\t\t\t\t\tif (g.connected === false) {\n\t\t\t\t\t\t\t\t\t\t\tg.onConnect?.();\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (soleTool) {\n\t\t\t\t\t\t\t\t\t\t\t// Single tool → add it directly (no drill-in).\n\t\t\t\t\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\t\t\t\t\tonAdd(soleTool.value);\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (usePicker) {\n\t\t\t\t\t\t\t\t\t\t\t// Open the `@` picker drilled straight into this source's tools.\n\t\t\t\t\t\t\t\t\t\t\tsetPickerSource(g.source);\n\t\t\t\t\t\t\t\t\t\t\tsetAdding(true);\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tsetActiveSource(g.source);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{renderSourceIcon(sourceIcon(g.source), -4)}\n\t\t\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\t\t\t{soleTool ? soleTool.label : g.label}\n\t\t\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t\t\t{g.connected === false && (\n\t\t\t\t\t\t\t\t\t\t// Not connected → show \"Connect\" upfront (consistent with\n\t\t\t\t\t\t\t\t\t\t// the `@` picker); clicking runs the connect flow.\n\t\t\t\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.brand}>\n\t\t\t\t\t\t\t\t\t\t\tConnect\n\t\t\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</SourceButton>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t\t{actionSources?.map((a) => (\n\t\t\t\t\t\t\t<SourceButton\n\t\t\t\t\t\t\t\tkey={a.source}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-action-${a.source}`}\n\t\t\t\t\t\t\t\t// Not connected → connect flow; otherwise close any open source\n\t\t\t\t\t\t\t\t// picker before opening this drawer, else the previous source's\n\t\t\t\t\t\t\t\t// popup lingers behind it.\n\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\ta.connected === false\n\t\t\t\t\t\t\t\t\t\t? () => a.onConnect?.()\n\t\t\t\t\t\t\t\t\t\t: () => {\n\t\t\t\t\t\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\t\t\t\t\t\ta.onSelect();\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{renderSourceIcon(a.icon, -4)}\n\t\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\t\t{a.label}\n\t\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t\t{a.connected === false && (\n\t\t\t\t\t\t\t\t\t// Not connected → \"Connect\" upfront (consistent with the\n\t\t\t\t\t\t\t\t\t// source buttons and the `@` picker).\n\t\t\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.brand}>\n\t\t\t\t\t\t\t\t\t\tConnect\n\t\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</SourceButton>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</SourceButtonRow>\n\n\t\t\t\t\t{/* Picker mode: clicking a source opens its tools in the `@` picker. */}\n\t\t\t\t\t{usePicker && adding && pickerSource !== null && (\n\t\t\t\t\t\t<PickerPopover\n\t\t\t\t\t\t\t$align=\"left\"\n\t\t\t\t\t\t\t$up={pickerOpensUp}\n\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-picker`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{pickerNode}\n\t\t\t\t\t\t</PickerPopover>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{/* Legacy (non-picker) mode: chosen source → its searchable tool list. */}\n\t\t\t\t\t{!usePicker && activeGroup && (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-dropdown`}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\t\t\tisSearchable\n\t\t\t\t\t\t\tplaceHolder={`Search ${activeGroup.label} tools`}\n\t\t\t\t\t\t\toptions={activeGroup.options}\n\t\t\t\t\t\t\tonSelect={(opt) => {\n\t\t\t\t\t\t\t\tconst v = unwrapDropdownValue(opt);\n\t\t\t\t\t\t\t\tsetActiveSource(null);\n\t\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\t\t\tonAdd(v);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</SourcePickerAnchor>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t{!usePicker && adding && dropdownOptions.length > 0 && (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-dropdown`}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\t\t\tisSearchable\n\t\t\t\t\t\t\tplaceHolder={`Select ${title.toLowerCase()}`}\n\t\t\t\t\t\t\toptions={dropdownOptions}\n\t\t\t\t\t\t\tonSelect={(opt) => {\n\t\t\t\t\t\t\t\tconst v = unwrapDropdownValue(opt);\n\t\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\t\tif (!v) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v === CREATE_OPTION_VALUE) {\n\t\t\t\t\t\t\t\t\tcreateOption?.onSelect();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tonAdd(v);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{items.length === 0 && !adding ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.placeholder}>\n\t\t\t\t\t\t\t\t{emptyText}\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t{showEmptyCreate && createOption && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-create`}\n\t\t\t\t\t\t\t\t\tbuttonType=\"secondary\"\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tmatchParentWidth\n\t\t\t\t\t\t\t\t\tLeadingIcon={PlusIcon}\n\t\t\t\t\t\t\t\t\tbuttonText={createOption.label}\n\t\t\t\t\t\t\t\t\tonClick={createOption.onSelect}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\trenderChipRows()\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t{confirmDelete && pendingDeleteId && (\n\t\t\t\t<DeleteConfirmationModal\n\t\t\t\t\tdata-test={`${dataTestPrefix}-delete-confirm`}\n\t\t\t\t\theader={`Delete this ${confirmDelete.noun}?`}\n\t\t\t\t\tsubHeader={`Deleting this ${confirmDelete.noun} will also remove it from your instructions, wherever it's referenced.`}\n\t\t\t\t\tconfirmationText=\"Delete\"\n\t\t\t\t\tzIndex={confirmDelete.zIndex}\n\t\t\t\t\tonDeleteConfirmed={() => {\n\t\t\t\t\t\tonRemove(pendingDeleteId);\n\t\t\t\t\t\tsetPendingDeleteId(null);\n\t\t\t\t\t}}\n\t\t\t\t\tonCancelClicked={() => setPendingDeleteId(null)}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</SideSection>\n\t);\n};\n\n// Anchors the `@`-picker popover to the header \"+\" button.\nconst AddButtonWrap = styled.div`\n\tposition: relative;\n\tdisplay: flex;\n`;\n\n// Anchors the `@`-picker popover to the empty-state source buttons.\nconst SourcePickerAnchor = styled.div`\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n`;\n\n// Floating card under the trigger. Aligns to the \"+\" (right) or the source\n// buttons (left) so it stays inside the side panel.\nconst PickerPopover = styled.div<{ $align?: 'left' | 'right'; $up?: boolean }>`\n\tposition: absolute;\n\t${(p) => (p.$up ? 'bottom: calc(100% + 4px);' : 'top: calc(100% + 4px);')}\n\t${(p) => (p.$align === 'left' ? 'left: 0;' : 'right: 0;')}\n\tz-index: 30;\n`;\n"],"names":["CREATE_OPTION_VALUE","SelectableListSection","title","helper","items","addableOptions","onAdd","onRemove","dataTestPrefix","emptyText","createOption","onConfigure","sourceGroups","mentionItems","actionSources","confirmDelete","pickerOpensUp","adding","setAdding","useState","pendingDeleteId","setPendingDeleteId","configuringId","setConfiguringId","activeSource","setActiveSource","hasSourceGroups","activeGroup","g","usePicker","headerPickerRef","useRef","sourcePickerRef","pickerSource","setPickerSource","useEffect","onDocMouseDown","e","target","onKeyDown","showAddButton","showEmptyCreate","hasActionSources","showSourceButtons","handleAddClick","v","handleConfigureClick","id","configure","result","renderChipRows","item","jsxs","SelectableRow","renderSourceIcon","RowLabel","jsx","Tooltip","RowText","BodySecondary","COLORS","Shield","RowActions","RowMenuButton","EditIcon","RowActionDivider","DeleteIcon","dropdownOptions","pickerNode","MentionPicker","a","source","SideSection","SideSectionHeader","TitleSmall","AddButtonWrap","AddIconButton","PlusIcon","PickerPopover","BodyCaption","SourcePickerAnchor","SourceButtonRow","soleTool","SourceButton","sourceIcon","Dropdown","opt","unwrapDropdownValue","Fragment","Button","DeleteConfirmationModal","styled","p"],"mappings":";;;;;;;;;;;;;;;;;AAuEA,MAAMA,IAAsB,sBAiEfC,KAA8D,CAAC;AAAA,EAC3E,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AACD,MAAM;AACL,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GAEpC,CAACC,GAAiBC,CAAkB,IAAIF,EAAwB,IAAI,GAIpE,CAACG,GAAeC,CAAgB,IAAIJ,EAAwB,IAAI,GAEhE,CAACK,IAAcC,CAAe,IAAIN,EAAwB,IAAI,GAC9DO,IAAkB,CAAC,CAACd,KAAgBA,EAAa,SAAS,GAC1De,IAAcf,GAAc,KAAK,CAACgB,MAAMA,EAAE,WAAWJ,EAAY,GAEjEK,IAAYhB,MAAiB,QAI7BiB,IAAkBC,EAAuB,IAAI,GAC7CC,IAAkBD,EAAuB,IAAI,GAG7C,CAACE,GAAcC,CAAe,IAAIf,EAA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AA,YAC5B,YAAW;AAAA,YACX,MAAK;AAAA,YACL,kBAAgB;AAAA,YAChB,aAAaqE;AAAAA,YACb,YAAYnE,EAAa;AAAA,YACzB,SAASA,EAAa;AAAA,UAAA;AAAA,QAAA;AAAA,MACvB,EAAA,CAEF,IAEAwC,GAAA;AAAA,IAAe,GAEjB;AAAA,IAEAnC,KAAiBK,KACjB,gBAAAoC;AAAA,MAACkC;AAAA,MAAA;AAAA,QACA,aAAW,GAAGlF,CAAc;AAAA,QAC5B,QAAQ,eAAeO,EAAc,IAAI;AAAA,QACzC,WAAW,iBAAiBA,EAAc,IAAI;AAAA,QAC9C,kBAAiB;AAAA,QACjB,QAAQA,EAAc;AAAA,QACtB,mBAAmB,MAAM;AACxB,UAAAR,EAASa,CAAe,GACxBC,EAAmB,IAAI;AAAA,QACxB;AAAA,QACA,iBAAiB,MAAMA,EAAmB,IAAI;AAAA,MAAA;AAAA,IAAA;AAAA,EAC/C,GAEF;AAEF,GAGMsD,KAAgBgB,EAAO;AAAA;AAAA;AAAA,GAMvBX,KAAqBW,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAS5Bb,IAAgBa,EAAO;AAAA;AAAA,GAE1B,CAACC,MAAOA,EAAE,MAAM,8BAA8B,wBAAyB;AAAA,GACvE,CAACA,MAAOA,EAAE,WAAW,SAAS,aAAa,WAAY;AAAA;AAAA;"}
|
|
1
|
+
{"version":3,"file":"SelectableListSection.js","sources":["../../../../../src/components/agent-builder/components/SelectableListSection.tsx"],"sourcesContent":["import DeleteIcon from '@src/assets/icons/delete.svg';\nimport EditIcon from '@src/assets/icons/edit.svg';\nimport PlusIcon from '@src/assets/icons/plus.svg';\nimport { MentionItem } from '@src/editor';\nimport { Shield } from '@src/icons';\nimport React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '@src/components/button';\nimport { Dropdown, unwrapDropdownValue } from '@src/components/dropdown';\nimport { SingleOption } from '@src/components/dropdown/type';\nimport { DeleteConfirmationModal } from '@src/components/states-modal';\nimport { Tooltip } from '@src/components/tooltips';\nimport {\n\tBodyCaption,\n\tBodySecondary,\n\tTitleSmall,\n} from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport {\n\tAddIconButton,\n\tRowActionDivider,\n\tRowActions,\n\tRowLabel,\n\tRowMenuButton,\n\tRowText,\n\tSelectableRow,\n\tSideSection,\n\tSideSectionHeader,\n\tSourceButton,\n\tSourceButtonRow,\n} from '../AgentBuilder.styled';\nimport { isIntegrationSource, ToolAction } from '../constants/tools';\nimport { renderSourceIcon, sourceIcon, SourceIcon } from '../utils/sourceIcons';\nimport { MentionPicker } from './MentionPicker';\n\nexport interface SelectableItem {\n\tid: string;\n\tlabel: string;\n\t/** Leading brand glyph (e.g. a tool's source icon). */\n\ticon?: SourceIcon;\n\t/**\n\t * True when the tool touches customer-private data and the agent must verify\n\t * the customer first (backend `auth_required`). Shows a shield glyph on the row.\n\t */\n\tauthRequired?: boolean;\n\t/**\n\t * When set, this row shows an edit (Configure) icon that calls this instead of\n\t * the section-level `onConfigure`. Use for rows that open their own drawer\n\t * (e.g. a configured Rest API / email-handover tool). A pending promise\n\t * disables the row's edit button until it settles (e.g. while the consumer\n\t * fetches the sub-agent's data before opening its drawer).\n\t */\n\tonConfigure?: () => void | Promise<void>;\n}\n\n/** A tool source for the empty-state picker (Tools): a button → its searchable list. */\nexport interface SourceGroup {\n\tsource: string;\n\tlabel: string;\n\toptions: SingleOption[];\n\t/**\n\t * Integration connection state for this source. `false` = the store hasn't\n\t * connected it → clicking the source button calls {@link onConnect} instead of\n\t * opening its tool list. `true`/absent → opens normally.\n\t */\n\tconnected?: boolean;\n\t/** Open the connect flow for this source (used when `connected === false`). */\n\tonConnect?: () => void;\n}\n\n/** Sentinel value for the \"create new\" entry in the add dropdown. */\nconst CREATE_OPTION_VALUE = '__bik_create_new__';\n\ninterface SelectableListSectionProps {\n\ttitle: string;\n\thelper?: string;\n\titems: SelectableItem[];\n\t/**\n\t * Options shown in the add dropdown. Pass ALL items (not just unselected\n\t * ones) when re-picking an already-added item is allowed (e.g. to insert its\n\t * mention again) — the chip list still shows each item only once.\n\t */\n\taddableOptions: SingleOption[];\n\tonAdd: (id: string) => void;\n\tonRemove: (id: string) => void;\n\tdataTestPrefix: string;\n\temptyText: string;\n\t/**\n\t * Adds a \"create new\" entry at the top of the add dropdown (e.g. \"Create\n\t * sub-agent\"). Selecting it calls `onSelect` instead of `onAdd`.\n\t */\n\tcreateOption?: { label: string; onSelect: () => void };\n\t/**\n\t * When provided, each row shows an edit (Configure) icon next to Delete.\n\t * Omit for tools (Delete only). A pending promise disables the edit buttons\n\t * until it settles.\n\t */\n\tonConfigure?: (id: string) => void | Promise<void>;\n\t/**\n\t * Tool sources (e.g. Manifest / Shopify). When set, the empty state shows a\n\t * button per source; clicking one reveals a searchable dropdown of just that\n\t * source's options. Selecting calls `onAdd`. Takes precedence over the plain\n\t * `addableOptions` dropdown.\n\t */\n\tsourceGroups?: SourceGroup[];\n\t/**\n\t * When provided, the header \"+\" opens the same `@` reference picker used in the\n\t * Instructions editor (a {@link MentionPicker} popover) instead of the inline\n\t * select dropdown. Pass the items for THIS section only (tools OR sub-agents) —\n\t * the picker auto-drills into the single category. Selecting a row calls\n\t * `onAdd(id)`; the picker's \"Create new\" row (sub-agents) calls\n\t * `createOption.onSelect`.\n\t */\n\tmentionItems?: MentionItem[];\n\t/**\n\t * Built-in \"action\" tools (e.g. Rest API / Handover to email) that open a\n\t * config drawer via `onSelect` instead of adding a mention. Shown as\n\t * empty-state source buttons (only while no items exist, alongside\n\t * `sourceGroups`) AND as rows inside the `@` picker's Tools view.\n\t */\n\tactionSources?: ToolAction[];\n\t/**\n\t * When set, the row Delete icon opens a confirmation modal (instead of\n\t * removing immediately); `onRemove` runs only on confirm. `noun` fills the one\n\t * shared message template (\"Delete this <noun>?\" …); `zIndex` raises the modal\n\t * above a parent drawer. Omit to delete directly.\n\t */\n\tconfirmDelete?: { noun: string; zIndex?: number };\n\t/**\n\t * Open the `@` picker popover above the trigger instead of below. Use inside\n\t * a drawer where the section sits near the bottom — opening downward\n\t * stretches the drawer and leaves a gap.\n\t */\n\tpickerOpensUp?: boolean;\n}\n\nexport const SelectableListSection: React.FC<SelectableListSectionProps> = ({\n\ttitle,\n\thelper,\n\titems,\n\taddableOptions,\n\tonAdd,\n\tonRemove,\n\tdataTestPrefix,\n\temptyText,\n\tcreateOption,\n\tonConfigure,\n\tsourceGroups,\n\tmentionItems,\n\tactionSources,\n\tconfirmDelete,\n\tpickerOpensUp,\n}) => {\n\tconst [adding, setAdding] = useState(false);\n\t// Row id awaiting delete confirmation (null = modal closed).\n\tconst [pendingDeleteId, setPendingDeleteId] = useState<string | null>(null);\n\t// Row id whose configure handler is in flight (async fetch before its drawer\n\t// opens) — all edit buttons are disabled meanwhile so the UI isn't\n\t// unresponsive to double clicks.\n\tconst [configuringId, setConfiguringId] = useState<string | null>(null);\n\t// Tools: which source's searchable list is open (null = just show the buttons).\n\tconst [activeSource, setActiveSource] = useState<string | null>(null);\n\tconst hasSourceGroups = !!sourceGroups && sourceGroups.length > 0;\n\tconst activeGroup = sourceGroups?.find((g) => g.source === activeSource);\n\t// When set, \"+\" opens the `@` MentionPicker popover instead of a select input.\n\tconst usePicker = mentionItems !== undefined;\n\t// Separate anchors for the header \"+\" popover and the empty-state source-button\n\t// popover — when empty both render at once, so a shared ref would misfire the\n\t// outside-click check (closing the header picker when a source row is clicked).\n\tconst headerPickerRef = useRef<HTMLDivElement>(null);\n\tconst sourcePickerRef = useRef<HTMLDivElement>(null);\n\t// Source (Shopify / Manifest) the empty-state button opened the picker into;\n\t// null when \"+\" opened it at the root source list.\n\tconst [pickerSource, setPickerSource] = useState<string | null>(null);\n\n\t// Dismiss the picker popover on outside click / Escape.\n\tuseEffect(() => {\n\t\tif (!usePicker || !adding) {\n\t\t\treturn;\n\t\t}\n\t\tconst onDocMouseDown = (e: MouseEvent) => {\n\t\t\tconst target = e.target as Node;\n\t\t\tif (\n\t\t\t\t!headerPickerRef.current?.contains(target) &&\n\t\t\t\t!sourcePickerRef.current?.contains(target)\n\t\t\t) {\n\t\t\t\tsetAdding(false);\n\t\t\t}\n\t\t};\n\t\tconst onKeyDown = (e: KeyboardEvent) => {\n\t\t\tif (e.key === 'Escape') {\n\t\t\t\tsetAdding(false);\n\t\t\t}\n\t\t};\n\t\tdocument.addEventListener('mousedown', onDocMouseDown);\n\t\tdocument.addEventListener('keydown', onKeyDown);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('mousedown', onDocMouseDown);\n\t\t\tdocument.removeEventListener('keydown', onKeyDown);\n\t\t};\n\t}, [usePicker, adding]);\n\n\t// Header \"+\" picks an EXISTING item (and, once some exist, re-creates via the\n\t// dropdown's footer row). With an empty list + a createOption the body shows a\n\t// dedicated \"Create new\" button instead, so the header \"+\" would be redundant.\n\t// In picker mode the \"+\" always shows (even empty) — for tools it sits next to\n\t// the empty-state source buttons; the create flow lives inside the picker.\n\tconst showAddButton = hasSourceGroups\n\t\t? usePicker || items.length > 0\n\t\t: usePicker ||\n\t\t addableOptions.length > 0 ||\n\t\t (!!createOption && items.length > 0);\n\t// Empty state offers a one-click \"Create new\" (sub-agents) rather than burying\n\t// it behind a single-item dropdown. In picker mode the \"+\" opens the picker\n\t// (with its own \"Create new\" row) instead, so skip the standalone button.\n\tconst showEmptyCreate =\n\t\titems.length === 0 && !!createOption && !hasSourceGroups && !usePicker;\n\tconst hasActionSources = !!actionSources && actionSources.length > 0;\n\t// Source buttons ONLY while no item is added — the tool sources (Manifest /\n\t// Shopify …) plus the built-in action tools (Rest API / Handover to email).\n\t// Once an item exists, adding more uses the header \"+\" → picker (the buttons\n\t// never come back); the action tools still live inside that picker.\n\tconst showSourceButtons =\n\t\t(hasSourceGroups || hasActionSources) && items.length === 0;\n\t// Nothing existing to pick → skip the 1-item dropdown and create directly.\n\tconst handleAddClick = () => {\n\t\tif (usePicker) {\n\t\t\t// Nothing to pick yet and a create flow exists (e.g. Sub-agents with none\n\t\t\t// added) → skip the empty picker and open the create drawer directly,\n\t\t\t// mirroring the single-tool \"one level up\" collapse.\n\t\t\tif ((mentionItems?.length ?? 0) === 0 && createOption) {\n\t\t\t\tcreateOption.onSelect();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Toggle the `@` reference-picker popover (rendered under the \"+\"), opened\n\t\t\t// at the root source list (no pre-drilled source).\n\t\t\tsetPickerSource(null);\n\t\t\tsetAdding((v) => !v);\n\t\t\treturn;\n\t\t}\n\t\tif (hasSourceGroups) {\n\t\t\tsetActiveSource(null);\n\t\t\tsetAdding((v) => !v);\n\t\t\treturn;\n\t\t}\n\t\tif (addableOptions.length === 0 && createOption) {\n\t\t\tcreateOption.onSelect();\n\t\t\treturn;\n\t\t}\n\t\tsetAdding((v) => !v);\n\t};\n\n\t// Run a row's configure handler; a returned promise disables the edit\n\t// buttons until it settles (same promise-sniff as the drawer Save buttons).\n\tconst handleConfigureClick = (\n\t\tid: string,\n\t\tconfigure: () => void | Promise<void>,\n\t) => {\n\t\tif (configuringId) {\n\t\t\treturn;\n\t\t}\n\t\tconst result = configure();\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetConfiguringId(id);\n\t\t\tvoid (result as Promise<void>).finally(() => setConfiguringId(null));\n\t\t}\n\t};\n\n\tconst renderChipRows = () =>\n\t\titems.map((item) => {\n\t\t\t// Per-item configure wins; otherwise fall back to the section-level one.\n\t\t\tconst configure =\n\t\t\t\titem.onConfigure ??\n\t\t\t\t(onConfigure ? () => onConfigure(item.id) : undefined);\n\t\t\treturn (\n\t\t\t\t<SelectableRow\n\t\t\t\t\tkey={item.id}\n\t\t\t\t\tdata-test={`${dataTestPrefix}-row-${item.id}`}\n\t\t\t\t>\n\t\t\t\t\t{renderSourceIcon(item.icon)}\n\t\t\t\t\t{/* Label + verification shield on one row: label truncates, the shield\n\t\t\t\t\t sits just after the text. */}\n\t\t\t\t\t<RowLabel>\n\t\t\t\t\t\t{/* Row label truncates to one line; tooltip surfaces the full name. */}\n\t\t\t\t\t\t<Tooltip body={item.label} placement=\"top\">\n\t\t\t\t\t\t\t<RowText>\n\t\t\t\t\t\t\t\t<BodySecondary numberOfLines={1} color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t</RowText>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t{item.authRequired && (\n\t\t\t\t\t\t\t// Order tools touch customer-private data — the shield flags that\n\t\t\t\t\t\t\t// this agent must verify the customer before the tool can run.\n\t\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\t\tbody=\"This tool requires customer verification\"\n\t\t\t\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-auth-${item.id}`}\n\t\t\t\t\t\t\t\t\tstyle={{ display: 'inline-flex', flexShrink: 0 }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Shield size={16} />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</RowLabel>\n\t\t\t\t\t<RowActions>\n\t\t\t\t\t\t{configure && (\n\t\t\t\t\t\t\t// Configurable rows (sub-agents, Rest API / email tools) get an\n\t\t\t\t\t\t\t// always-visible edit icon.\n\t\t\t\t\t\t\t<Tooltip body=\"Edit\" placement=\"top\">\n\t\t\t\t\t\t\t\t<RowMenuButton\n\t\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-edit-${item.id}`}\n\t\t\t\t\t\t\t\t\taria-label={`Edit ${item.label}`}\n\t\t\t\t\t\t\t\t\tdisabled={configuringId !== null}\n\t\t\t\t\t\t\t\t\tonClick={() => handleConfigureClick(item.id, configure)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EditIcon\n\t\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</RowMenuButton>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{configure && <RowActionDivider aria-hidden />}\n\t\t\t\t\t\t<Tooltip body=\"Delete\" placement=\"top\">\n\t\t\t\t\t\t\t<RowMenuButton\n\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-delete-${item.id}`}\n\t\t\t\t\t\t\t\taria-label={`Delete ${item.label}`}\n\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\tconfirmDelete\n\t\t\t\t\t\t\t\t\t\t? setPendingDeleteId(item.id)\n\t\t\t\t\t\t\t\t\t\t: onRemove(item.id)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DeleteIcon\n\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</RowMenuButton>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t</RowActions>\n\t\t\t\t</SelectableRow>\n\t\t\t);\n\t\t});\n\t// \"Create new\" is a brand-coloured footer row at the BOTTOM of the dropdown,\n\t// separated from the selectable items by a divider.\n\tconst dropdownOptions: SingleOption[] = createOption\n\t\t? [\n\t\t\t\t...addableOptions,\n\t\t\t\t{\n\t\t\t\t\tlabel: createOption.label,\n\t\t\t\t\tvalue: CREATE_OPTION_VALUE,\n\t\t\t\t\tsearchKey: createOption.label,\n\t\t\t\t\tcustomComponent: (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\t\t\t\tcolor: COLORS.content.brand,\n\t\t\t\t\t\t\t\tfontFamily: 'Inter',\n\t\t\t\t\t\t\t\tfontSize: 14,\n\t\t\t\t\t\t\t\tfontWeight: 600,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{createOption.label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t ]\n\t\t: addableOptions;\n\n\t// One picker instance reused by the header \"+\" and the empty-state source\n\t// buttons. `key` remounts it so a source button re-drills into its own tools\n\t// (the initial drill-in level is read once, on mount).\n\tconst pickerNode = usePicker ? (\n\t\t<MentionPicker\n\t\t\tkey={pickerSource ?? '__root__'}\n\t\t\titems={mentionItems ?? []}\n\t\t\tquery=\"\"\n\t\t\tactiveIndex={0}\n\t\t\tinitialSource={pickerSource ?? undefined}\n\t\t\tonSelect={(item) => {\n\t\t\t\tsetAdding(false);\n\t\t\t\tonAdd(String(item.id));\n\t\t\t}}\n\t\t\tonClose={() => setAdding(false)}\n\t\t\tonCreateSubAgent={\n\t\t\t\tcreateOption\n\t\t\t\t\t? () => {\n\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\tcreateOption.onSelect();\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\ttoolActions={\n\t\t\t\thasActionSources\n\t\t\t\t\t? actionSources?.map((a) => ({\n\t\t\t\t\t\t\t...a,\n\t\t\t\t\t\t\tonSelect: () => {\n\t\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\t\ta.onSelect();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t }))\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\t// Gate native source rows in the picker on their connected state, derived\n\t\t\t// from the source groups (which already carry connected/onConnect). This is\n\t\t\t// what makes the \"+\" dropdown show \"Connect\" for unconnected vendors,\n\t\t\t// consistent with the empty-state buttons.\n\t\t\tintegrationStatus={Object.fromEntries(\n\t\t\t\t(sourceGroups ?? [])\n\t\t\t\t\t.filter((g) => g.connected !== undefined)\n\t\t\t\t\t.map((g) => [g.source, g.connected]),\n\t\t\t)}\n\t\t\tonConnectIntegration={(source) => {\n\t\t\t\tsetAdding(false);\n\t\t\t\tsourceGroups?.find((g) => g.source === source)?.onConnect?.();\n\t\t\t}}\n\t\t/>\n\t) : null;\n\n\treturn (\n\t\t<SideSection>\n\t\t\t<SideSectionHeader>\n\t\t\t\t<TitleSmall color={COLORS.content.primary}>{title}</TitleSmall>\n\t\t\t\t{showAddButton && (\n\t\t\t\t\t<AddButtonWrap ref={headerPickerRef}>\n\t\t\t\t\t\t<AddIconButton\n\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-add`}\n\t\t\t\t\t\t\tonClick={handleAddClick}\n\t\t\t\t\t\t\taria-label={`Add ${title}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PlusIcon width={16} height={16} color={COLORS.content.primary} />\n\t\t\t\t\t\t</AddIconButton>\n\t\t\t\t\t\t{usePicker && adding && pickerSource === null && (\n\t\t\t\t\t\t\t<PickerPopover\n\t\t\t\t\t\t\t\t$up={pickerOpensUp}\n\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-picker`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{pickerNode}\n\t\t\t\t\t\t\t</PickerPopover>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</AddButtonWrap>\n\t\t\t\t)}\n\t\t\t</SideSectionHeader>\n\n\t\t\t{helper && (\n\t\t\t\t<BodyCaption color={COLORS.content.secondary}>{helper}</BodyCaption>\n\t\t\t)}\n\n\t\t\t{showSourceButtons ? (\n\t\t\t\t<SourcePickerAnchor ref={usePicker ? sourcePickerRef : undefined}>\n\t\t\t\t\t{/* No tools yet: one button per source (never shown once a tool exists). */}\n\t\t\t\t\t<SourceButtonRow data-test={`${dataTestPrefix}-sources`}>\n\t\t\t\t\t\t{sourceGroups?.map((g) => {\n\t\t\t\t\t\t\t// A connected source with exactly one tool is pointless to drill\n\t\t\t\t\t\t\t// into — surface that single tool right here (its name + the source\n\t\t\t\t\t\t\t// icon) and add it on click, mirroring the `@` picker's single-leaf\n\t\t\t\t\t\t\t// collapse. Connect still wins when the source isn't connected.\n\t\t\t\t\t\t\t// Vendor integrations are exempt (same carve-out the picker makes):\n\t\t\t\t\t\t\t// each stays its own drill-in group so it reads as a discoverable,\n\t\t\t\t\t\t\t// connectable unit even when it serves a single tool.\n\t\t\t\t\t\t\tconst soleTool =\n\t\t\t\t\t\t\t\tg.connected !== false &&\n\t\t\t\t\t\t\t\tg.options.length === 1 &&\n\t\t\t\t\t\t\t\t!isIntegrationSource(g.source)\n\t\t\t\t\t\t\t\t\t? g.options[0]\n\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<SourceButton\n\t\t\t\t\t\t\t\t\tkey={g.source}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-source-${g.source}`}\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t// Not connected → open the connect flow instead of the tools.\n\t\t\t\t\t\t\t\t\t\tif (g.connected === false) {\n\t\t\t\t\t\t\t\t\t\t\tg.onConnect?.();\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (soleTool) {\n\t\t\t\t\t\t\t\t\t\t\t// Single tool → add it directly (no drill-in).\n\t\t\t\t\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\t\t\t\t\tonAdd(soleTool.value);\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (usePicker) {\n\t\t\t\t\t\t\t\t\t\t\t// Open the `@` picker drilled straight into this source's tools.\n\t\t\t\t\t\t\t\t\t\t\tsetPickerSource(g.source);\n\t\t\t\t\t\t\t\t\t\t\tsetAdding(true);\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tsetActiveSource(g.source);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{renderSourceIcon(sourceIcon(g.source), -4)}\n\t\t\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\t\t\t{soleTool ? soleTool.label : g.label}\n\t\t\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t\t\t{g.connected === false && (\n\t\t\t\t\t\t\t\t\t\t// Not connected → show \"Connect\" upfront (consistent with\n\t\t\t\t\t\t\t\t\t\t// the `@` picker); clicking runs the connect flow.\n\t\t\t\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.brand}>\n\t\t\t\t\t\t\t\t\t\t\tConnect\n\t\t\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</SourceButton>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t\t{actionSources?.map((a) => (\n\t\t\t\t\t\t\t<SourceButton\n\t\t\t\t\t\t\t\tkey={a.source}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-action-${a.source}`}\n\t\t\t\t\t\t\t\t// Not connected → connect flow; otherwise close any open source\n\t\t\t\t\t\t\t\t// picker before opening this drawer, else the previous source's\n\t\t\t\t\t\t\t\t// popup lingers behind it.\n\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\ta.connected === false\n\t\t\t\t\t\t\t\t\t\t? () => a.onConnect?.()\n\t\t\t\t\t\t\t\t\t\t: () => {\n\t\t\t\t\t\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\t\t\t\t\t\ta.onSelect();\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{renderSourceIcon(a.icon, -4)}\n\t\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\t\t{a.label}\n\t\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t\t{a.connected === false && (\n\t\t\t\t\t\t\t\t\t// Not connected → \"Connect\" upfront (consistent with the\n\t\t\t\t\t\t\t\t\t// source buttons and the `@` picker).\n\t\t\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.brand}>\n\t\t\t\t\t\t\t\t\t\tConnect\n\t\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</SourceButton>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</SourceButtonRow>\n\n\t\t\t\t\t{/* Picker mode: clicking a source opens its tools in the `@` picker. */}\n\t\t\t\t\t{usePicker && adding && pickerSource !== null && (\n\t\t\t\t\t\t<PickerPopover\n\t\t\t\t\t\t\t$align=\"left\"\n\t\t\t\t\t\t\t$up={pickerOpensUp}\n\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-picker`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{pickerNode}\n\t\t\t\t\t\t</PickerPopover>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{/* Legacy (non-picker) mode: chosen source → its searchable tool list. */}\n\t\t\t\t\t{!usePicker && activeGroup && (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-dropdown`}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\t\t\tisSearchable\n\t\t\t\t\t\t\tplaceHolder={`Search ${activeGroup.label} tools`}\n\t\t\t\t\t\t\toptions={activeGroup.options}\n\t\t\t\t\t\t\tonSelect={(opt) => {\n\t\t\t\t\t\t\t\tconst v = unwrapDropdownValue(opt);\n\t\t\t\t\t\t\t\tsetActiveSource(null);\n\t\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\t\t\tonAdd(v);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</SourcePickerAnchor>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t{!usePicker && adding && dropdownOptions.length > 0 && (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-dropdown`}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\t\t\tisSearchable\n\t\t\t\t\t\t\tplaceHolder={`Select ${title.toLowerCase()}`}\n\t\t\t\t\t\t\toptions={dropdownOptions}\n\t\t\t\t\t\t\tonSelect={(opt) => {\n\t\t\t\t\t\t\t\tconst v = unwrapDropdownValue(opt);\n\t\t\t\t\t\t\t\tsetAdding(false);\n\t\t\t\t\t\t\t\tif (!v) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v === CREATE_OPTION_VALUE) {\n\t\t\t\t\t\t\t\t\tcreateOption?.onSelect();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tonAdd(v);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{items.length === 0 && !adding ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.placeholder}>\n\t\t\t\t\t\t\t\t{emptyText}\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t{showEmptyCreate && createOption && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tdata-test={`${dataTestPrefix}-create`}\n\t\t\t\t\t\t\t\t\tbuttonType=\"secondary\"\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tmatchParentWidth\n\t\t\t\t\t\t\t\t\tLeadingIcon={PlusIcon}\n\t\t\t\t\t\t\t\t\tbuttonText={createOption.label}\n\t\t\t\t\t\t\t\t\tonClick={createOption.onSelect}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\trenderChipRows()\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t{confirmDelete && pendingDeleteId && (\n\t\t\t\t<DeleteConfirmationModal\n\t\t\t\t\tdata-test={`${dataTestPrefix}-delete-confirm`}\n\t\t\t\t\theader={`Delete this ${confirmDelete.noun}?`}\n\t\t\t\t\tsubHeader={`Deleting this ${confirmDelete.noun} will also remove it from your instructions, wherever it's referenced.`}\n\t\t\t\t\tconfirmationText=\"Delete\"\n\t\t\t\t\tzIndex={confirmDelete.zIndex}\n\t\t\t\t\tonDeleteConfirmed={() => {\n\t\t\t\t\t\tonRemove(pendingDeleteId);\n\t\t\t\t\t\tsetPendingDeleteId(null);\n\t\t\t\t\t}}\n\t\t\t\t\tonCancelClicked={() => setPendingDeleteId(null)}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</SideSection>\n\t);\n};\n\n// Anchors the `@`-picker popover to the header \"+\" button.\nconst AddButtonWrap = styled.div`\n\tposition: relative;\n\tdisplay: flex;\n`;\n\n// Anchors the `@`-picker popover to the empty-state source buttons.\nconst SourcePickerAnchor = styled.div`\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n`;\n\n// Floating card under the trigger. Aligns to the \"+\" (right) or the source\n// buttons (left) so it stays inside the side panel.\nconst PickerPopover = styled.div<{ $align?: 'left' | 'right'; $up?: boolean }>`\n\tposition: absolute;\n\t${(p) => (p.$up ? 'bottom: calc(100% + 4px);' : 'top: calc(100% + 4px);')}\n\t${(p) => (p.$align === 'left' ? 'left: 0;' : 'right: 0;')}\n\tz-index: 30;\n`;\n"],"names":["CREATE_OPTION_VALUE","SelectableListSection","title","helper","items","addableOptions","onAdd","onRemove","dataTestPrefix","emptyText","createOption","onConfigure","sourceGroups","mentionItems","actionSources","confirmDelete","pickerOpensUp","adding","setAdding","useState","pendingDeleteId","setPendingDeleteId","configuringId","setConfiguringId","activeSource","setActiveSource","hasSourceGroups","activeGroup","g","usePicker","headerPickerRef","useRef","sourcePickerRef","pickerSource","setPickerSource","useEffect","onDocMouseDown","e","target","onKeyDown","showAddButton","showEmptyCreate","hasActionSources","showSourceButtons","handleAddClick","v","handleConfigureClick","id","configure","result","renderChipRows","item","jsxs","SelectableRow","renderSourceIcon","RowLabel","jsx","Tooltip","RowText","BodySecondary","COLORS","Shield","RowActions","RowMenuButton","EditIcon","RowActionDivider","DeleteIcon","dropdownOptions","pickerNode","MentionPicker","a","source","SideSection","SideSectionHeader","TitleSmall","AddButtonWrap","AddIconButton","PlusIcon","PickerPopover","BodyCaption","SourcePickerAnchor","SourceButtonRow","soleTool","isIntegrationSource","SourceButton","sourceIcon","Dropdown","opt","unwrapDropdownValue","Fragment","Button","DeleteConfirmationModal","styled","p"],"mappings":";;;;;;;;;;;;;;;;;;AAuEA,MAAMA,IAAsB,sBAiEfC,KAA8D,CAAC;AAAA,EAC3E,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AACD,MAAM;AACL,QAAM,CAACC,GAAQC,CAAS,IAAIC,E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BAA8B,wBAAyB;AAAA,GACvE,CAACA,MAAOA,EAAE,WAAW,SAAS,aAAa,WAAY;AAAA;AAAA;"}
|
|
@@ -5,39 +5,9 @@ export interface StepDefinition {
|
|
|
5
5
|
index: number;
|
|
6
6
|
/** Rail label + content section title. */
|
|
7
7
|
title: string;
|
|
8
|
-
/**
|
|
9
|
-
* Helper text under the section title. May contain {@link APP_TOKEN}, which
|
|
10
|
-
* resolves to the host app's name at render time — see {@link resolveAppToken}.
|
|
11
|
-
*/
|
|
8
|
+
/** Helper text under the section title. */
|
|
12
9
|
helper: string;
|
|
13
10
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Placeholder for the host application's name in user-facing copy. The builder
|
|
16
|
-
* ships in both BIK and Manifest, so any sentence naming the product has to be
|
|
17
|
-
* resolved against `applicationType` rather than hardcoded.
|
|
18
|
-
*/
|
|
19
|
-
export declare const APP_TOKEN = "{app}";
|
|
20
|
-
/**
|
|
21
|
-
* The label {@link APP_TOKEN} resolves to when the consumer passes no
|
|
22
|
-
* `applicationType` — i.e. what every existing caller already sees.
|
|
23
|
-
*/
|
|
24
|
-
export declare const DEFAULT_APP_LABEL = "Manifest";
|
|
25
|
-
/** Swap {@link APP_TOKEN} for the host app's label (e.g. "Manifest", "BIK"). */
|
|
26
|
-
export declare const resolveAppToken: (text: string, appLabel: string) => string;
|
|
27
|
-
/**
|
|
28
|
-
* Step copy with {@link APP_TOKEN} left UNRESOLVED. Only the builder itself reads
|
|
29
|
-
* this — it resolves the token against the host app at render time.
|
|
30
|
-
*
|
|
31
|
-
* `STEP_DEFINITIONS` (below) is the public, already-resolved export: it is part
|
|
32
|
-
* of the library's API, so it keeps reading "Manifest" exactly as it always has
|
|
33
|
-
* rather than leaking a raw `{app}` token to anyone consuming the constant.
|
|
34
|
-
*/
|
|
35
|
-
export declare const STEP_DEFINITION_TEMPLATES: StepDefinition[];
|
|
36
|
-
/**
|
|
37
|
-
* Public step definitions, resolved to the default host label. Unchanged output
|
|
38
|
-
* for every existing consumer; the builder uses
|
|
39
|
-
* {@link STEP_DEFINITION_TEMPLATES} instead so it can name the real host app.
|
|
40
|
-
*/
|
|
41
11
|
export declare const STEP_DEFINITIONS: StepDefinition[];
|
|
42
12
|
export declare const STEP_KEYS: StepKey[];
|
|
43
13
|
export declare const getStepIndex: (key: StepKey) => number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t =
|
|
1
|
+
const t = [
|
|
2
2
|
{
|
|
3
3
|
key: "about",
|
|
4
4
|
index: 1,
|
|
@@ -9,7 +9,7 @@ const t = "{app}", o = "Manifest", s = (e, n) => e.split(t).join(n), a = [
|
|
|
9
9
|
key: "trigger",
|
|
10
10
|
index: 2,
|
|
11
11
|
title: "When it steps in",
|
|
12
|
-
helper:
|
|
12
|
+
helper: "Choose how Manifest knows when to route a conversation to this agent."
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
key: "response",
|
|
@@ -23,19 +23,10 @@ const t = "{app}", o = "Manifest", s = (e, n) => e.split(t).join(n), a = [
|
|
|
23
23
|
title: "Handover rules",
|
|
24
24
|
helper: "Define when this agent passes the conversation to a human, and how."
|
|
25
25
|
}
|
|
26
|
-
],
|
|
27
|
-
(e) => ({
|
|
28
|
-
...e,
|
|
29
|
-
helper: s(e.helper, o)
|
|
30
|
-
})
|
|
31
|
-
), h = i.map((e) => e.key), r = (e) => h.indexOf(e);
|
|
26
|
+
], n = t.map((e) => e.key), o = (e) => n.indexOf(e);
|
|
32
27
|
export {
|
|
33
|
-
t as
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
a as STEP_DEFINITION_TEMPLATES,
|
|
37
|
-
h as STEP_KEYS,
|
|
38
|
-
r as getStepIndex,
|
|
39
|
-
s as resolveAppToken
|
|
28
|
+
t as STEP_DEFINITIONS,
|
|
29
|
+
n as STEP_KEYS,
|
|
30
|
+
o as getStepIndex
|
|
40
31
|
};
|
|
41
32
|
//# sourceMappingURL=steps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.js","sources":["../../../../../src/components/agent-builder/constants/steps.ts"],"sourcesContent":["import { StepKey } from '../AgentBuilder.model';\n\nexport interface StepDefinition {\n\tkey: StepKey;\n\t/** 1-based number shown in the rail. */\n\tindex: number;\n\t/** Rail label + content section title. */\n\ttitle: string;\n\t
|
|
1
|
+
{"version":3,"file":"steps.js","sources":["../../../../../src/components/agent-builder/constants/steps.ts"],"sourcesContent":["import { StepKey } from '../AgentBuilder.model';\n\nexport interface StepDefinition {\n\tkey: StepKey;\n\t/** 1-based number shown in the rail. */\n\tindex: number;\n\t/** Rail label + content section title. */\n\ttitle: string;\n\t/** Helper text under the section title. */\n\thelper: string;\n}\n\nexport const STEP_DEFINITIONS: StepDefinition[] = [\n\t{\n\t\tkey: 'about',\n\t\tindex: 1,\n\t\ttitle: 'About this agent',\n\t\thelper:\n\t\t\t'Give it a name and one clear job. One agent → one job, that’s what keeps answers sharp.',\n\t},\n\t{\n\t\tkey: 'trigger',\n\t\tindex: 2,\n\t\ttitle: 'When it steps in',\n\t\thelper:\n\t\t\t'Choose how Manifest knows when to route a conversation to this agent.',\n\t},\n\t{\n\t\tkey: 'response',\n\t\tindex: 3,\n\t\ttitle: 'How it responds',\n\t\thelper:\n\t\t\t'Write what this agent should do. Type @ to reference a tool, add a condition, or hand off to a sub-agent.',\n\t},\n\t{\n\t\tkey: 'handover',\n\t\tindex: 4,\n\t\ttitle: 'Handover rules',\n\t\thelper:\n\t\t\t'Define when this agent passes the conversation to a human, and how.',\n\t},\n];\n\nexport const STEP_KEYS: StepKey[] = STEP_DEFINITIONS.map((s) => s.key);\n\nexport const getStepIndex = (key: StepKey): number => STEP_KEYS.indexOf(key);\n"],"names":["STEP_DEFINITIONS","STEP_KEYS","s","getStepIndex","key"],"mappings":"AAYO,MAAMA,IAAqC;AAAA,EACjD;AAAA,IACC,KAAK;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QACC;AAAA,EAAA;AAAA,EAEF;AAAA,IACC,KAAK;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QACC;AAAA,EAAA;AAAA,EAEF;AAAA,IACC,KAAK;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QACC;AAAA,EAAA;AAAA,EAEF;AAAA,IACC,KAAK;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QACC;AAAA,EAAA;AAEH,GAEaC,IAAuBD,EAAiB,IAAI,CAACE,MAAMA,EAAE,GAAG,GAExDC,IAAe,CAACC,MAAyBH,EAAU,QAAQG,CAAG;"}
|
|
@@ -36,6 +36,7 @@ export declare enum ToolSource {
|
|
|
36
36
|
Shipstation = "shipstation",
|
|
37
37
|
Skio = "skio",
|
|
38
38
|
Gorgias = "gorgias",
|
|
39
|
+
Aftership = "aftership",
|
|
39
40
|
Integration = "integration",
|
|
40
41
|
RestApi = "rest_api",
|
|
41
42
|
EmailHandover = "email_handover",
|
|
@@ -112,9 +113,9 @@ export declare const isIntegrationSource: (source: string) => boolean;
|
|
|
112
113
|
/**
|
|
113
114
|
* Vendor integrations that live UNDER the "More Integrations" umbrella in the `@`
|
|
114
115
|
* picker (a single top-level row → their list), instead of each being its own
|
|
115
|
-
* root row. Shopify, BigCommerce, Skio and
|
|
116
|
-
* their own; only the less-common vendors (ShipStation) and the
|
|
117
|
-
* catch-all Integration are tucked away here.
|
|
116
|
+
* root row. Shopify, BigCommerce, Skio, Gorgias and AfterShip stay top-level
|
|
117
|
+
* sources of their own; only the less-common vendors (ShipStation) and the
|
|
118
|
+
* generic catch-all Integration are tucked away here.
|
|
118
119
|
*/
|
|
119
120
|
export declare const MORE_INTEGRATION_SOURCES: ToolSource[];
|
|
120
121
|
/** True for a source shown under the "More Integrations" umbrella. */
|
|
@@ -127,8 +128,8 @@ export declare const isMoreIntegrationSource: (source: string) => boolean;
|
|
|
127
128
|
*/
|
|
128
129
|
export declare const MORE_INTEGRATIONS_KEY = "more_integrations";
|
|
129
130
|
export declare const MORE_INTEGRATIONS_LABEL = "More Integrations";
|
|
130
|
-
/** Always last — sits after every named top-level source (REST API, rank
|
|
131
|
-
export declare const MORE_INTEGRATIONS_RANK =
|
|
131
|
+
/** Always last — sits after every named top-level source (REST API, rank 9). */
|
|
132
|
+
export declare const MORE_INTEGRATIONS_RANK = 10;
|
|
132
133
|
/** Sort rank for a source string; unknown sources rank after all known ones. */
|
|
133
134
|
export declare const toolSourceRank: (source: string) => number;
|
|
134
135
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _ = [
|
|
2
2
|
{ key: "tool", label: "Tools" },
|
|
3
3
|
{ key: "subagent", label: "Sub-agent" },
|
|
4
4
|
{ key: "variable", label: "Variables" }
|
|
5
5
|
];
|
|
6
|
-
var a = /* @__PURE__ */ ((i) => (i.Manifest = "manifest", i.Shopify = "shopify", i.Bigcommerce = "bigcommerce", i.Shipstation = "shipstation", i.Skio = "skio", i.Gorgias = "gorgias", i.Integration = "integration", i.RestApi = "rest_api", i.EmailHandover = "email_handover", i.Slack = "slack", i))(a || {});
|
|
6
|
+
var a = /* @__PURE__ */ ((i) => (i.Manifest = "manifest", i.Shopify = "shopify", i.Bigcommerce = "bigcommerce", i.Shipstation = "shipstation", i.Skio = "skio", i.Gorgias = "gorgias", i.Aftership = "aftership", i.Integration = "integration", i.RestApi = "rest_api", i.EmailHandover = "email_handover", i.Slack = "slack", i))(a || {});
|
|
7
7
|
const O = {
|
|
8
8
|
manifest: "Manifest",
|
|
9
9
|
shopify: "Shopify",
|
|
@@ -11,15 +11,16 @@ const O = {
|
|
|
11
11
|
shipstation: "ShipStation",
|
|
12
12
|
skio: "Skio",
|
|
13
13
|
gorgias: "Gorgias",
|
|
14
|
+
aftership: "AfterShip",
|
|
14
15
|
integration: "Integration",
|
|
15
16
|
rest_api: "Rest API",
|
|
16
17
|
email_handover: "Email",
|
|
17
18
|
slack: "Slack"
|
|
18
|
-
},
|
|
19
|
+
}, E = {
|
|
19
20
|
rest_api: "REST API",
|
|
20
21
|
email_handover: "Send email",
|
|
21
22
|
slack: "Send Slack message"
|
|
22
|
-
},
|
|
23
|
+
}, c = [
|
|
23
24
|
"rest_api",
|
|
24
25
|
"email_handover",
|
|
25
26
|
"slack"
|
|
@@ -27,49 +28,51 @@ const O = {
|
|
|
27
28
|
], s = {
|
|
28
29
|
manifest: 0,
|
|
29
30
|
shopify: 1,
|
|
30
|
-
// BigCommerce / Skio / Gorgias are their OWN top-level rows; rank
|
|
31
|
-
// so adding/updating a tool never reshuffles them.
|
|
31
|
+
// BigCommerce / Skio / Gorgias / AfterShip are their OWN top-level rows; rank
|
|
32
|
+
// orders them so adding/updating a tool never reshuffles them.
|
|
32
33
|
bigcommerce: 2,
|
|
33
34
|
skio: 3,
|
|
34
35
|
gorgias: 4,
|
|
36
|
+
aftership: 5,
|
|
35
37
|
// ShipStation lives under the "More Integrations" umbrella; its rank only
|
|
36
38
|
// orders it inside that drill-in view (never shown at the root).
|
|
37
|
-
shipstation:
|
|
38
|
-
slack:
|
|
39
|
+
shipstation: 6,
|
|
40
|
+
slack: 7,
|
|
39
41
|
// Send Email then REST API sit after the integration sources at the top level.
|
|
40
|
-
email_handover:
|
|
41
|
-
rest_api:
|
|
42
|
-
},
|
|
42
|
+
email_handover: 8,
|
|
43
|
+
rest_api: 9
|
|
44
|
+
}, t = [
|
|
43
45
|
"shopify",
|
|
44
46
|
"bigcommerce",
|
|
45
47
|
"shipstation",
|
|
46
48
|
"skio",
|
|
47
49
|
"gorgias",
|
|
50
|
+
"aftership",
|
|
48
51
|
"integration"
|
|
49
52
|
/* Integration */
|
|
50
|
-
],
|
|
53
|
+
], e = new Set(t), g = (i) => e.has(i), n = [
|
|
51
54
|
"shipstation",
|
|
52
55
|
"integration"
|
|
53
56
|
/* Integration */
|
|
54
|
-
], o = new Set(n), S = (i) => o.has(i), R = "more_integrations",
|
|
57
|
+
], o = new Set(n), S = (i) => o.has(i), R = "more_integrations", h = "More Integrations", m = 10, r = Object.keys(s).length, p = (i) => s[i] ?? r, I = {
|
|
55
58
|
email_handover: "send_email",
|
|
56
59
|
slack: "send_slack_message"
|
|
57
60
|
};
|
|
58
61
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
_ as CATEGORIES,
|
|
63
|
+
I as CONFIG_TOOL_SOURCES,
|
|
64
|
+
t as INTEGRATION_SOURCES,
|
|
62
65
|
R as MORE_INTEGRATIONS_KEY,
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
h as MORE_INTEGRATIONS_LABEL,
|
|
67
|
+
m as MORE_INTEGRATIONS_RANK,
|
|
65
68
|
n as MORE_INTEGRATION_SOURCES,
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
E as TOOL_ACTION_LABELS,
|
|
70
|
+
c as TOOL_ACTION_SOURCES,
|
|
68
71
|
O as TOOL_SOURCE_LABELS,
|
|
69
72
|
s as TOOL_SOURCE_RANK,
|
|
70
73
|
a as ToolSource,
|
|
71
74
|
g as isIntegrationSource,
|
|
72
75
|
S as isMoreIntegrationSource,
|
|
73
|
-
|
|
76
|
+
p as toolSourceRank
|
|
74
77
|
};
|
|
75
78
|
//# sourceMappingURL=tools.js.map
|