@burtson-labs/bandit-engine 2.0.90 → 2.0.93
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-HYXGXPJM.mjs} +2 -2
- package/dist/{chunk-ZOUKYB66.mjs → chunk-GQHA7AIS.mjs} +2 -2
- package/dist/{chunk-42X7ZU6O.mjs → chunk-JOY64M5C.mjs} +116 -96
- package/dist/chunk-JOY64M5C.mjs.map +1 -0
- package/dist/index.js +92 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +92 -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-HYXGXPJM.mjs.map} +0 -0
- /package/dist/{chunk-ZOUKYB66.mjs.map → chunk-GQHA7AIS.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -15412,83 +15412,103 @@ 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
|
+
sx: {
|
|
15431
|
+
display: "inline-flex",
|
|
15432
|
+
alignItems: "center",
|
|
15433
|
+
flexShrink: 0,
|
|
15434
|
+
gap: 0.5,
|
|
15435
|
+
height: 26,
|
|
15436
|
+
px: 0.75,
|
|
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
|
+
component: "span",
|
|
15481
|
+
sx: { maxWidth: 150, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
15482
|
+
children: label
|
|
15483
|
+
}
|
|
15484
|
+
)
|
|
15485
|
+
]
|
|
15486
|
+
}
|
|
15487
|
+
)
|
|
15478
15488
|
}
|
|
15479
|
-
)
|
|
15489
|
+
);
|
|
15480
15490
|
};
|
|
15481
15491
|
SourceChips = ({ content }) => {
|
|
15482
15492
|
const sources = (0, import_react18.useMemo)(() => parseWebSources(content), [content]);
|
|
15483
15493
|
if (sources.length === 0) return null;
|
|
15484
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.
|
|
15485
|
-
|
|
15486
|
-
|
|
15487
|
-
|
|
15488
|
-
|
|
15489
|
-
|
|
15490
|
-
|
|
15491
|
-
|
|
15494
|
+
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: [
|
|
15495
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15496
|
+
import_material11.Box,
|
|
15497
|
+
{
|
|
15498
|
+
component: "span",
|
|
15499
|
+
sx: {
|
|
15500
|
+
fontSize: 11,
|
|
15501
|
+
fontWeight: 700,
|
|
15502
|
+
color: "text.secondary",
|
|
15503
|
+
textTransform: "uppercase",
|
|
15504
|
+
letterSpacing: 0.5,
|
|
15505
|
+
flexShrink: 0
|
|
15506
|
+
},
|
|
15507
|
+
children: "Sources"
|
|
15508
|
+
}
|
|
15509
|
+
),
|
|
15510
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material11.Box, { sx: { display: "flex", flexWrap: "wrap", alignItems: "center", gap: 0.75 }, children: sources.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SourceChip, { source: s }, `${s.url}-${i}`)) })
|
|
15511
|
+
] });
|
|
15492
15512
|
};
|
|
15493
15513
|
source_chips_default = SourceChips;
|
|
15494
15514
|
}
|
|
@@ -15598,7 +15618,7 @@ var init_chat_messages = __esm({
|
|
|
15598
15618
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
15599
15619
|
StreamingMarkdown_default,
|
|
15600
15620
|
{
|
|
15601
|
-
content:
|
|
15621
|
+
content: stripSourcesForDisplay(content),
|
|
15602
15622
|
isStreaming: isStreaming && isLast,
|
|
15603
15623
|
sources: sourceSummaries
|
|
15604
15624
|
}
|