@burtson-labs/bandit-engine 2.0.97 → 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/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  chat_default
3
- } from "./chunk-JOY64M5C.mjs";
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-2YAYYEA7.mjs";
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.jsxs)(
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
- 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",
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
- 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 }
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
- 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
- ]
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)(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}`)) })
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 = [];
@@ -42452,13 +42452,13 @@ var ProviderTab = () => {
42452
42452
  showMessage("Connection test failed. Please check your configuration.", "error");
42453
42453
  }
42454
42454
  };
42455
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_material29.Box, { sx: { p: { xs: 1.5, sm: 3, md: 4 } }, children: [
42455
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_material29.Box, { sx: { p: { xs: 1.5, sm: 2.5, md: 3 } }, children: [
42456
42456
  /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_material29.Box, { sx: { mb: { xs: 2.5, md: 3 } }, children: [
42457
42457
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
42458
42458
  import_material29.Typography,
42459
42459
  {
42460
42460
  variant: "h5",
42461
- sx: { fontWeight: 600, mb: 1, color: "primary.main", fontSize: { xs: "1.6rem", md: "1.8rem" } },
42461
+ sx: { fontWeight: 600, mb: 1, color: "primary.main", fontSize: { xs: "1.3rem", md: "1.45rem" } },
42462
42462
  children: "AI Provider Configuration"
42463
42463
  }
42464
42464
  ),