@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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
chat_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JOY64M5C.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-GQHA7AIS.mjs";
|
|
14
14
|
import "./chunk-RUMVTVNM.mjs";
|
|
15
15
|
import "./chunk-ZLXWNTFK.mjs";
|
|
16
16
|
import "./chunk-L2EKYO4F.mjs";
|
|
@@ -20389,83 +20389,103 @@ 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
|
+
sx: {
|
|
20408
|
+
display: "inline-flex",
|
|
20409
|
+
alignItems: "center",
|
|
20410
|
+
flexShrink: 0,
|
|
20411
|
+
gap: 0.5,
|
|
20412
|
+
height: 26,
|
|
20413
|
+
px: 0.75,
|
|
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
|
+
component: "span",
|
|
20458
|
+
sx: { maxWidth: 150, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
20459
|
+
children: label
|
|
20460
|
+
}
|
|
20461
|
+
)
|
|
20462
|
+
]
|
|
20463
|
+
}
|
|
20464
|
+
)
|
|
20455
20465
|
}
|
|
20456
|
-
)
|
|
20466
|
+
);
|
|
20457
20467
|
};
|
|
20458
20468
|
SourceChips = ({ content }) => {
|
|
20459
20469
|
const sources = (0, import_react43.useMemo)(() => parseWebSources(content), [content]);
|
|
20460
20470
|
if (sources.length === 0) return null;
|
|
20461
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.
|
|
20462
|
-
|
|
20463
|
-
|
|
20464
|
-
|
|
20465
|
-
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
|
|
20471
|
+
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: [
|
|
20472
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20473
|
+
import_material35.Box,
|
|
20474
|
+
{
|
|
20475
|
+
component: "span",
|
|
20476
|
+
sx: {
|
|
20477
|
+
fontSize: 11,
|
|
20478
|
+
fontWeight: 700,
|
|
20479
|
+
color: "text.secondary",
|
|
20480
|
+
textTransform: "uppercase",
|
|
20481
|
+
letterSpacing: 0.5,
|
|
20482
|
+
flexShrink: 0
|
|
20483
|
+
},
|
|
20484
|
+
children: "Sources"
|
|
20485
|
+
}
|
|
20486
|
+
),
|
|
20487
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material35.Box, { sx: { display: "flex", flexWrap: "wrap", alignItems: "center", gap: 0.75 }, children: sources.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SourceChip, { source: s }, `${s.url}-${i}`)) })
|
|
20488
|
+
] });
|
|
20469
20489
|
};
|
|
20470
20490
|
source_chips_default = SourceChips;
|
|
20471
20491
|
}
|
|
@@ -20575,7 +20595,7 @@ var init_chat_messages = __esm({
|
|
|
20575
20595
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
20576
20596
|
StreamingMarkdown_default,
|
|
20577
20597
|
{
|
|
20578
|
-
content:
|
|
20598
|
+
content: stripSourcesForDisplay(content),
|
|
20579
20599
|
isStreaming: isStreaming && isLast,
|
|
20580
20600
|
sources: sourceSummaries
|
|
20581
20601
|
}
|