@burtson-labs/bandit-engine 2.0.98 → 2.0.99
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-HYXGXPJM.mjs → chat-IOBCRT5Y.mjs} +2 -2
- package/dist/{chunk-JOY64M5C.mjs → chunk-C2SY64XM.mjs} +53 -53
- package/dist/chunk-C2SY64XM.mjs.map +1 -0
- package/dist/{chunk-USTEWR7Z.mjs → chunk-I7WBZVTR.mjs} +2 -2
- package/dist/index.js +52 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +52 -52
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-JOY64M5C.mjs.map +0 -1
- /package/dist/{chat-HYXGXPJM.mjs.map → chat-IOBCRT5Y.mjs.map} +0 -0
- /package/dist/{chunk-USTEWR7Z.mjs.map → chunk-I7WBZVTR.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-C2SY64XM.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-I7WBZVTR.mjs";
|
|
14
14
|
import "./chunk-RUMVTVNM.mjs";
|
|
15
15
|
import "./chunk-ZLXWNTFK.mjs";
|
|
16
16
|
import "./chunk-L2EKYO4F.mjs";
|
|
@@ -20397,69 +20397,48 @@ var init_source_chips = __esm({
|
|
|
20397
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
20398
|
] }),
|
|
20399
20399
|
arrow: true,
|
|
20400
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime35.
|
|
20400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20401
20401
|
import_material35.Box,
|
|
20402
20402
|
{
|
|
20403
20403
|
component: "a",
|
|
20404
20404
|
href: source.url,
|
|
20405
20405
|
target: "_blank",
|
|
20406
20406
|
rel: "noopener noreferrer",
|
|
20407
|
+
className: "source-chip",
|
|
20407
20408
|
sx: {
|
|
20408
20409
|
display: "inline-flex",
|
|
20409
20410
|
alignItems: "center",
|
|
20411
|
+
justifyContent: "center",
|
|
20410
20412
|
flexShrink: 0,
|
|
20411
|
-
|
|
20412
|
-
height:
|
|
20413
|
-
|
|
20414
|
-
|
|
20415
|
-
|
|
20416
|
-
|
|
20417
|
-
bgcolor: "background.paper",
|
|
20418
|
-
textDecoration: "none",
|
|
20413
|
+
width: 28,
|
|
20414
|
+
height: 28,
|
|
20415
|
+
borderRadius: "50%",
|
|
20416
|
+
border: "2px solid",
|
|
20417
|
+
borderColor: "background.paper",
|
|
20418
|
+
bgcolor: "action.hover",
|
|
20419
20419
|
color: "text.primary",
|
|
20420
|
-
|
|
20421
|
-
|
|
20422
|
-
|
|
20423
|
-
|
|
20420
|
+
textDecoration: "none",
|
|
20421
|
+
// Hover lifts the chip via transform/z-index only — no layout reflow,
|
|
20422
|
+
// so the overlapping stack can never jitter the way the expand did.
|
|
20423
|
+
transition: "transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease",
|
|
20424
|
+
"&:hover": {
|
|
20425
|
+
transform: "translateY(-3px)",
|
|
20426
|
+
boxShadow: 3,
|
|
20427
|
+
borderColor: "primary.main",
|
|
20428
|
+
zIndex: 3
|
|
20429
|
+
}
|
|
20424
20430
|
},
|
|
20425
|
-
children:
|
|
20426
|
-
|
|
20427
|
-
|
|
20428
|
-
|
|
20429
|
-
|
|
20430
|
-
|
|
20431
|
-
|
|
20432
|
-
|
|
20433
|
-
|
|
20434
|
-
|
|
20435
|
-
|
|
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
|
-
]
|
|
20431
|
+
children: failed ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material35.Box, { component: "span", sx: { fontSize: 11, fontWeight: 700, color: "primary.main" }, children: domain.charAt(0).toUpperCase() }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20432
|
+
import_material35.Box,
|
|
20433
|
+
{
|
|
20434
|
+
component: "img",
|
|
20435
|
+
src: `https://icons.duckduckgo.com/ip3/${domain}.ico`,
|
|
20436
|
+
alt: "",
|
|
20437
|
+
loading: "lazy",
|
|
20438
|
+
onError: () => setFailed(true),
|
|
20439
|
+
sx: { width: 16, height: 16, borderRadius: "4px", flexShrink: 0 }
|
|
20440
|
+
}
|
|
20441
|
+
)
|
|
20463
20442
|
}
|
|
20464
20443
|
)
|
|
20465
20444
|
}
|
|
@@ -20484,7 +20463,19 @@ var init_source_chips = __esm({
|
|
|
20484
20463
|
children: "Sources"
|
|
20485
20464
|
}
|
|
20486
20465
|
),
|
|
20487
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20466
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20467
|
+
import_material35.Box,
|
|
20468
|
+
{
|
|
20469
|
+
sx: {
|
|
20470
|
+
display: "flex",
|
|
20471
|
+
alignItems: "center",
|
|
20472
|
+
// Overlapping stack; each chip lifts on hover (no reflow → no jitter).
|
|
20473
|
+
"& .source-chip": { ml: "-9px" },
|
|
20474
|
+
"& .source-chip:first-of-type": { ml: 0 }
|
|
20475
|
+
},
|
|
20476
|
+
children: sources.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SourceChip, { source: s }, `${s.url}-${i}`))
|
|
20477
|
+
}
|
|
20478
|
+
)
|
|
20488
20479
|
] });
|
|
20489
20480
|
};
|
|
20490
20481
|
source_chips_default = SourceChips;
|
|
@@ -23936,6 +23927,15 @@ ${fn}(${argStr})
|
|
|
23936
23927
|
\`\`\``;
|
|
23937
23928
|
}
|
|
23938
23929
|
}
|
|
23930
|
+
if (!/```(?:tool_code|TOOL_CODE)/.test(fullMessage)) {
|
|
23931
|
+
const plainToolFence = /```[a-zA-Z0-9_-]*[ \t]*\n([ \t]*(?:web_search|web_fetch|image_generation|create_file|ask_user)[\s\S]*?)\n```/;
|
|
23932
|
+
const fm = fullMessage.match(plainToolFence);
|
|
23933
|
+
if (fm) {
|
|
23934
|
+
fullMessage = fullMessage.replace(plainToolFence, `\`\`\`tool_code
|
|
23935
|
+
${fm[1].trim()}
|
|
23936
|
+
\`\`\``);
|
|
23937
|
+
}
|
|
23938
|
+
}
|
|
23939
23939
|
const toolCallMatches = fullMessage.match(/```(?:tool_code|TOOL_CODE)\s*\n([^`]+)\n```/gi);
|
|
23940
23940
|
let enhancedMessage = fullMessage;
|
|
23941
23941
|
const summarizableResults = [];
|