@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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
chat_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JJNPBLJ7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
chat_provider_default
|
|
6
6
|
} from "./chunk-OSSZ7Z2O.mjs";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useGatewayHealth,
|
|
11
11
|
useGatewayMemory,
|
|
12
12
|
useGatewayModels
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AS6WS4H2.mjs";
|
|
14
14
|
import "./chunk-RUMVTVNM.mjs";
|
|
15
15
|
import "./chunk-ZLXWNTFK.mjs";
|
|
16
16
|
import "./chunk-L2EKYO4F.mjs";
|
|
@@ -20389,83 +20389,134 @@ var init_source_chips = __esm({
|
|
|
20389
20389
|
const [failed, setFailed] = (0, import_react43.useState)(false);
|
|
20390
20390
|
const domain = domainOf(source.url);
|
|
20391
20391
|
const label = source.title?.trim() || domain;
|
|
20392
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20393
|
-
import_material35.
|
|
20392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20393
|
+
import_material35.Tooltip,
|
|
20394
20394
|
{
|
|
20395
|
-
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
|
|
20400
|
-
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
|
|
20412
|
-
|
|
20413
|
-
|
|
20414
|
-
|
|
20415
|
-
|
|
20416
|
-
|
|
20417
|
-
|
|
20418
|
-
|
|
20419
|
-
|
|
20420
|
-
|
|
20421
|
-
|
|
20422
|
-
|
|
20423
|
-
|
|
20424
|
-
|
|
20425
|
-
|
|
20426
|
-
|
|
20427
|
-
|
|
20428
|
-
|
|
20429
|
-
|
|
20430
|
-
|
|
20431
|
-
|
|
20432
|
-
|
|
20433
|
-
|
|
20434
|
-
|
|
20435
|
-
|
|
20436
|
-
|
|
20437
|
-
|
|
20438
|
-
|
|
20439
|
-
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
|
|
20444
|
-
|
|
20445
|
-
|
|
20446
|
-
|
|
20447
|
-
|
|
20448
|
-
|
|
20449
|
-
|
|
20450
|
-
|
|
20451
|
-
|
|
20452
|
-
|
|
20453
|
-
|
|
20454
|
-
|
|
20395
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
20396
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material35.Box, { sx: { fontWeight: 600 }, children: label }),
|
|
20397
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material35.Box, { sx: { opacity: 0.75, fontSize: 11, wordBreak: "break-all", mt: 0.25 }, children: source.url })
|
|
20398
|
+
] }),
|
|
20399
|
+
arrow: true,
|
|
20400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
20401
|
+
import_material35.Box,
|
|
20402
|
+
{
|
|
20403
|
+
component: "a",
|
|
20404
|
+
href: source.url,
|
|
20405
|
+
target: "_blank",
|
|
20406
|
+
rel: "noopener noreferrer",
|
|
20407
|
+
className: "source-chip",
|
|
20408
|
+
sx: {
|
|
20409
|
+
display: "inline-flex",
|
|
20410
|
+
alignItems: "center",
|
|
20411
|
+
flexShrink: 0,
|
|
20412
|
+
height: 26,
|
|
20413
|
+
px: 0.4,
|
|
20414
|
+
borderRadius: 999,
|
|
20415
|
+
border: "1px solid",
|
|
20416
|
+
borderColor: "divider",
|
|
20417
|
+
bgcolor: "background.paper",
|
|
20418
|
+
textDecoration: "none",
|
|
20419
|
+
color: "text.primary",
|
|
20420
|
+
fontSize: 12.5,
|
|
20421
|
+
lineHeight: 1.4,
|
|
20422
|
+
transition: "border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease",
|
|
20423
|
+
"&:hover": { borderColor: "primary.main", bgcolor: "action.hover", boxShadow: 1, zIndex: 2 }
|
|
20424
|
+
},
|
|
20425
|
+
children: [
|
|
20426
|
+
failed ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20427
|
+
import_material35.Box,
|
|
20428
|
+
{
|
|
20429
|
+
sx: {
|
|
20430
|
+
width: 18,
|
|
20431
|
+
height: 18,
|
|
20432
|
+
borderRadius: "50%",
|
|
20433
|
+
bgcolor: "primary.main",
|
|
20434
|
+
color: "primary.contrastText",
|
|
20435
|
+
display: "grid",
|
|
20436
|
+
placeItems: "center",
|
|
20437
|
+
fontSize: 9,
|
|
20438
|
+
fontWeight: 700,
|
|
20439
|
+
flexShrink: 0
|
|
20440
|
+
},
|
|
20441
|
+
children: domain.charAt(0).toUpperCase()
|
|
20442
|
+
}
|
|
20443
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20444
|
+
import_material35.Box,
|
|
20445
|
+
{
|
|
20446
|
+
component: "img",
|
|
20447
|
+
src: `https://icons.duckduckgo.com/ip3/${domain}.ico`,
|
|
20448
|
+
alt: "",
|
|
20449
|
+
loading: "lazy",
|
|
20450
|
+
onError: () => setFailed(true),
|
|
20451
|
+
sx: { width: 18, height: 18, borderRadius: "50%", flexShrink: 0 }
|
|
20452
|
+
}
|
|
20453
|
+
),
|
|
20454
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20455
|
+
import_material35.Box,
|
|
20456
|
+
{
|
|
20457
|
+
className: "chip-label",
|
|
20458
|
+
component: "span",
|
|
20459
|
+
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
20460
|
+
children: label
|
|
20461
|
+
}
|
|
20462
|
+
)
|
|
20463
|
+
]
|
|
20464
|
+
}
|
|
20465
|
+
)
|
|
20455
20466
|
}
|
|
20456
|
-
)
|
|
20467
|
+
);
|
|
20457
20468
|
};
|
|
20458
20469
|
SourceChips = ({ content }) => {
|
|
20459
20470
|
const sources = (0, import_react43.useMemo)(() => parseWebSources(content), [content]);
|
|
20460
20471
|
if (sources.length === 0) return null;
|
|
20461
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.
|
|
20462
|
-
|
|
20463
|
-
|
|
20464
|
-
|
|
20465
|
-
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
|
|
20472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_material35.Box, { sx: { display: "flex", alignItems: "center", gap: 0.75, mt: 1.5, flexWrap: "wrap" }, "aria-label": "Sources", children: [
|
|
20473
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20474
|
+
import_material35.Box,
|
|
20475
|
+
{
|
|
20476
|
+
component: "span",
|
|
20477
|
+
sx: {
|
|
20478
|
+
fontSize: 11,
|
|
20479
|
+
fontWeight: 700,
|
|
20480
|
+
color: "text.secondary",
|
|
20481
|
+
textTransform: "uppercase",
|
|
20482
|
+
letterSpacing: 0.5,
|
|
20483
|
+
flexShrink: 0
|
|
20484
|
+
},
|
|
20485
|
+
children: "Sources"
|
|
20486
|
+
}
|
|
20487
|
+
),
|
|
20488
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20489
|
+
import_material35.Box,
|
|
20490
|
+
{
|
|
20491
|
+
sx: {
|
|
20492
|
+
display: "flex",
|
|
20493
|
+
alignItems: "center",
|
|
20494
|
+
flexWrap: "wrap",
|
|
20495
|
+
rowGap: 0.5,
|
|
20496
|
+
// Touch / no-hover devices: chips stay expanded (no hover to reveal).
|
|
20497
|
+
"& .source-chip": { ml: "4px" },
|
|
20498
|
+
"& .source-chip:first-of-type": { ml: 0 },
|
|
20499
|
+
"& .chip-label": { maxWidth: 200, opacity: 1, ml: 0.6 },
|
|
20500
|
+
// Hover-capable devices: collapse into an overlapping favicon stack
|
|
20501
|
+
// that spreads out and reveals titles when the rail is hovered.
|
|
20502
|
+
"@media (hover: hover)": {
|
|
20503
|
+
"& .source-chip": { ml: "-10px", transition: "margin-left 0.22s ease" },
|
|
20504
|
+
"& .source-chip:first-of-type": { ml: 0 },
|
|
20505
|
+
"& .chip-label": {
|
|
20506
|
+
maxWidth: 0,
|
|
20507
|
+
opacity: 0,
|
|
20508
|
+
ml: 0,
|
|
20509
|
+
transition: "max-width 0.28s ease, opacity 0.18s ease, margin-left 0.2s ease"
|
|
20510
|
+
},
|
|
20511
|
+
"&:hover .source-chip": { ml: "6px" },
|
|
20512
|
+
"&:hover .source-chip:first-of-type": { ml: 0 },
|
|
20513
|
+
"&:hover .chip-label": { maxWidth: 200, opacity: 1, ml: 0.6 }
|
|
20514
|
+
}
|
|
20515
|
+
},
|
|
20516
|
+
children: sources.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SourceChip, { source: s }, `${s.url}-${i}`))
|
|
20517
|
+
}
|
|
20518
|
+
)
|
|
20519
|
+
] });
|
|
20469
20520
|
};
|
|
20470
20521
|
source_chips_default = SourceChips;
|
|
20471
20522
|
}
|
|
@@ -20575,7 +20626,7 @@ var init_chat_messages = __esm({
|
|
|
20575
20626
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
20576
20627
|
StreamingMarkdown_default,
|
|
20577
20628
|
{
|
|
20578
|
-
content:
|
|
20629
|
+
content: stripSourcesForDisplay(content),
|
|
20579
20630
|
isStreaming: isStreaming && isLast,
|
|
20580
20631
|
sources: sourceSummaries
|
|
20581
20632
|
}
|