@burtson-labs/bandit-engine 2.0.90 → 2.0.92
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/{chat-W5NCAI6Z.mjs → chat-L3VMBI6A.mjs} +2 -2
- package/dist/{chunk-ZOUKYB66.mjs → chunk-AS6WS4H2.mjs} +2 -2
- package/dist/{chunk-42X7ZU6O.mjs → chunk-JJNPBLJ7.mjs} +147 -96
- package/dist/chunk-JJNPBLJ7.mjs.map +1 -0
- package/dist/index.js +123 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +123 -72
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-42X7ZU6O.mjs.map +0 -1
- /package/dist/{chat-W5NCAI6Z.mjs.map → chat-L3VMBI6A.mjs.map} +0 -0
- /package/dist/{chunk-ZOUKYB66.mjs.map → chunk-AS6WS4H2.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -15412,83 +15412,134 @@ var init_source_chips = __esm({
|
|
|
15412
15412
|
const [failed, setFailed] = (0, import_react18.useState)(false);
|
|
15413
15413
|
const domain = domainOf(source.url);
|
|
15414
15414
|
const label = source.title?.trim() || domain;
|
|
15415
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15416
|
-
import_material11.
|
|
15415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15416
|
+
import_material11.Tooltip,
|
|
15417
15417
|
{
|
|
15418
|
-
|
|
15419
|
-
|
|
15420
|
-
|
|
15421
|
-
|
|
15422
|
-
|
|
15423
|
-
|
|
15424
|
-
|
|
15425
|
-
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
|
|
15432
|
-
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
|
|
15437
|
-
|
|
15438
|
-
|
|
15439
|
-
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
15454
|
-
|
|
15455
|
-
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
|
|
15460
|
-
|
|
15461
|
-
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15476
|
-
|
|
15477
|
-
|
|
15418
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
15419
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material11.Box, { sx: { fontWeight: 600 }, children: label }),
|
|
15420
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material11.Box, { sx: { opacity: 0.75, fontSize: 11, wordBreak: "break-all", mt: 0.25 }, children: source.url })
|
|
15421
|
+
] }),
|
|
15422
|
+
arrow: true,
|
|
15423
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
15424
|
+
import_material11.Box,
|
|
15425
|
+
{
|
|
15426
|
+
component: "a",
|
|
15427
|
+
href: source.url,
|
|
15428
|
+
target: "_blank",
|
|
15429
|
+
rel: "noopener noreferrer",
|
|
15430
|
+
className: "source-chip",
|
|
15431
|
+
sx: {
|
|
15432
|
+
display: "inline-flex",
|
|
15433
|
+
alignItems: "center",
|
|
15434
|
+
flexShrink: 0,
|
|
15435
|
+
height: 26,
|
|
15436
|
+
px: 0.4,
|
|
15437
|
+
borderRadius: 999,
|
|
15438
|
+
border: "1px solid",
|
|
15439
|
+
borderColor: "divider",
|
|
15440
|
+
bgcolor: "background.paper",
|
|
15441
|
+
textDecoration: "none",
|
|
15442
|
+
color: "text.primary",
|
|
15443
|
+
fontSize: 12.5,
|
|
15444
|
+
lineHeight: 1.4,
|
|
15445
|
+
transition: "border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease",
|
|
15446
|
+
"&:hover": { borderColor: "primary.main", bgcolor: "action.hover", boxShadow: 1, zIndex: 2 }
|
|
15447
|
+
},
|
|
15448
|
+
children: [
|
|
15449
|
+
failed ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15450
|
+
import_material11.Box,
|
|
15451
|
+
{
|
|
15452
|
+
sx: {
|
|
15453
|
+
width: 18,
|
|
15454
|
+
height: 18,
|
|
15455
|
+
borderRadius: "50%",
|
|
15456
|
+
bgcolor: "primary.main",
|
|
15457
|
+
color: "primary.contrastText",
|
|
15458
|
+
display: "grid",
|
|
15459
|
+
placeItems: "center",
|
|
15460
|
+
fontSize: 9,
|
|
15461
|
+
fontWeight: 700,
|
|
15462
|
+
flexShrink: 0
|
|
15463
|
+
},
|
|
15464
|
+
children: domain.charAt(0).toUpperCase()
|
|
15465
|
+
}
|
|
15466
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15467
|
+
import_material11.Box,
|
|
15468
|
+
{
|
|
15469
|
+
component: "img",
|
|
15470
|
+
src: `https://icons.duckduckgo.com/ip3/${domain}.ico`,
|
|
15471
|
+
alt: "",
|
|
15472
|
+
loading: "lazy",
|
|
15473
|
+
onError: () => setFailed(true),
|
|
15474
|
+
sx: { width: 18, height: 18, borderRadius: "50%", flexShrink: 0 }
|
|
15475
|
+
}
|
|
15476
|
+
),
|
|
15477
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15478
|
+
import_material11.Box,
|
|
15479
|
+
{
|
|
15480
|
+
className: "chip-label",
|
|
15481
|
+
component: "span",
|
|
15482
|
+
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
15483
|
+
children: label
|
|
15484
|
+
}
|
|
15485
|
+
)
|
|
15486
|
+
]
|
|
15487
|
+
}
|
|
15488
|
+
)
|
|
15478
15489
|
}
|
|
15479
|
-
)
|
|
15490
|
+
);
|
|
15480
15491
|
};
|
|
15481
15492
|
SourceChips = ({ content }) => {
|
|
15482
15493
|
const sources = (0, import_react18.useMemo)(() => parseWebSources(content), [content]);
|
|
15483
15494
|
if (sources.length === 0) return null;
|
|
15484
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.
|
|
15485
|
-
|
|
15486
|
-
|
|
15487
|
-
|
|
15488
|
-
|
|
15489
|
-
|
|
15490
|
-
|
|
15491
|
-
|
|
15495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material11.Box, { sx: { display: "flex", alignItems: "center", gap: 0.75, mt: 1.5, flexWrap: "wrap" }, "aria-label": "Sources", children: [
|
|
15496
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15497
|
+
import_material11.Box,
|
|
15498
|
+
{
|
|
15499
|
+
component: "span",
|
|
15500
|
+
sx: {
|
|
15501
|
+
fontSize: 11,
|
|
15502
|
+
fontWeight: 700,
|
|
15503
|
+
color: "text.secondary",
|
|
15504
|
+
textTransform: "uppercase",
|
|
15505
|
+
letterSpacing: 0.5,
|
|
15506
|
+
flexShrink: 0
|
|
15507
|
+
},
|
|
15508
|
+
children: "Sources"
|
|
15509
|
+
}
|
|
15510
|
+
),
|
|
15511
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15512
|
+
import_material11.Box,
|
|
15513
|
+
{
|
|
15514
|
+
sx: {
|
|
15515
|
+
display: "flex",
|
|
15516
|
+
alignItems: "center",
|
|
15517
|
+
flexWrap: "wrap",
|
|
15518
|
+
rowGap: 0.5,
|
|
15519
|
+
// Touch / no-hover devices: chips stay expanded (no hover to reveal).
|
|
15520
|
+
"& .source-chip": { ml: "4px" },
|
|
15521
|
+
"& .source-chip:first-of-type": { ml: 0 },
|
|
15522
|
+
"& .chip-label": { maxWidth: 200, opacity: 1, ml: 0.6 },
|
|
15523
|
+
// Hover-capable devices: collapse into an overlapping favicon stack
|
|
15524
|
+
// that spreads out and reveals titles when the rail is hovered.
|
|
15525
|
+
"@media (hover: hover)": {
|
|
15526
|
+
"& .source-chip": { ml: "-10px", transition: "margin-left 0.22s ease" },
|
|
15527
|
+
"& .source-chip:first-of-type": { ml: 0 },
|
|
15528
|
+
"& .chip-label": {
|
|
15529
|
+
maxWidth: 0,
|
|
15530
|
+
opacity: 0,
|
|
15531
|
+
ml: 0,
|
|
15532
|
+
transition: "max-width 0.28s ease, opacity 0.18s ease, margin-left 0.2s ease"
|
|
15533
|
+
},
|
|
15534
|
+
"&:hover .source-chip": { ml: "6px" },
|
|
15535
|
+
"&:hover .source-chip:first-of-type": { ml: 0 },
|
|
15536
|
+
"&:hover .chip-label": { maxWidth: 200, opacity: 1, ml: 0.6 }
|
|
15537
|
+
}
|
|
15538
|
+
},
|
|
15539
|
+
children: sources.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SourceChip, { source: s }, `${s.url}-${i}`))
|
|
15540
|
+
}
|
|
15541
|
+
)
|
|
15542
|
+
] });
|
|
15492
15543
|
};
|
|
15493
15544
|
source_chips_default = SourceChips;
|
|
15494
15545
|
}
|
|
@@ -15598,7 +15649,7 @@ var init_chat_messages = __esm({
|
|
|
15598
15649
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
15599
15650
|
StreamingMarkdown_default,
|
|
15600
15651
|
{
|
|
15601
|
-
content:
|
|
15652
|
+
content: stripSourcesForDisplay(content),
|
|
15602
15653
|
isStreaming: isStreaming && isLast,
|
|
15603
15654
|
sources: sourceSummaries
|
|
15604
15655
|
}
|