@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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  chat_default
3
- } from "./chunk-JOY64M5C.mjs";
3
+ } from "./chunk-C2SY64XM.mjs";
4
4
  import "./chunk-ONQMRE2G.mjs";
5
5
  import "./chunk-RUMVTVNM.mjs";
6
6
  import "./chunk-L2EKYO4F.mjs";
@@ -13,4 +13,4 @@ import "./chunk-BJTO5JO5.mjs";
13
13
  export {
14
14
  chat_default as default
15
15
  };
16
- //# sourceMappingURL=chat-HYXGXPJM.mjs.map
16
+ //# sourceMappingURL=chat-IOBCRT5Y.mjs.map
@@ -455,69 +455,48 @@ var SourceChip = ({ source }) => {
455
455
  /* @__PURE__ */ jsx5(Box3, { sx: { opacity: 0.75, fontSize: 11, wordBreak: "break-all", mt: 0.25 }, children: source.url })
456
456
  ] }),
457
457
  arrow: true,
458
- children: /* @__PURE__ */ jsxs2(
458
+ children: /* @__PURE__ */ jsx5(
459
459
  Box3,
460
460
  {
461
461
  component: "a",
462
462
  href: source.url,
463
463
  target: "_blank",
464
464
  rel: "noopener noreferrer",
465
+ className: "source-chip",
465
466
  sx: {
466
467
  display: "inline-flex",
467
468
  alignItems: "center",
469
+ justifyContent: "center",
468
470
  flexShrink: 0,
469
- gap: 0.5,
470
- height: 26,
471
- px: 0.75,
472
- borderRadius: 999,
473
- border: "1px solid",
474
- borderColor: "divider",
475
- bgcolor: "background.paper",
476
- textDecoration: "none",
471
+ width: 28,
472
+ height: 28,
473
+ borderRadius: "50%",
474
+ border: "2px solid",
475
+ borderColor: "background.paper",
476
+ bgcolor: "action.hover",
477
477
  color: "text.primary",
478
- fontSize: 12.5,
479
- lineHeight: 1.4,
480
- transition: "border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease",
481
- "&:hover": { borderColor: "primary.main", bgcolor: "action.hover", boxShadow: 1, zIndex: 2 }
478
+ textDecoration: "none",
479
+ // Hover lifts the chip via transform/z-index only — no layout reflow,
480
+ // so the overlapping stack can never jitter the way the expand did.
481
+ transition: "transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease",
482
+ "&:hover": {
483
+ transform: "translateY(-3px)",
484
+ boxShadow: 3,
485
+ borderColor: "primary.main",
486
+ zIndex: 3
487
+ }
482
488
  },
483
- children: [
484
- failed ? /* @__PURE__ */ jsx5(
485
- Box3,
486
- {
487
- sx: {
488
- width: 18,
489
- height: 18,
490
- borderRadius: "50%",
491
- bgcolor: "primary.main",
492
- color: "primary.contrastText",
493
- display: "grid",
494
- placeItems: "center",
495
- fontSize: 9,
496
- fontWeight: 700,
497
- flexShrink: 0
498
- },
499
- children: domain.charAt(0).toUpperCase()
500
- }
501
- ) : /* @__PURE__ */ jsx5(
502
- Box3,
503
- {
504
- component: "img",
505
- src: `https://icons.duckduckgo.com/ip3/${domain}.ico`,
506
- alt: "",
507
- loading: "lazy",
508
- onError: () => setFailed(true),
509
- sx: { width: 18, height: 18, borderRadius: "50%", flexShrink: 0 }
510
- }
511
- ),
512
- /* @__PURE__ */ jsx5(
513
- Box3,
514
- {
515
- component: "span",
516
- sx: { maxWidth: 150, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
517
- children: label
518
- }
519
- )
520
- ]
489
+ children: failed ? /* @__PURE__ */ jsx5(Box3, { component: "span", sx: { fontSize: 11, fontWeight: 700, color: "primary.main" }, children: domain.charAt(0).toUpperCase() }) : /* @__PURE__ */ jsx5(
490
+ Box3,
491
+ {
492
+ component: "img",
493
+ src: `https://icons.duckduckgo.com/ip3/${domain}.ico`,
494
+ alt: "",
495
+ loading: "lazy",
496
+ onError: () => setFailed(true),
497
+ sx: { width: 16, height: 16, borderRadius: "4px", flexShrink: 0 }
498
+ }
499
+ )
521
500
  }
522
501
  )
523
502
  }
@@ -542,7 +521,19 @@ var SourceChips = ({ content }) => {
542
521
  children: "Sources"
543
522
  }
544
523
  ),
545
- /* @__PURE__ */ jsx5(Box3, { sx: { display: "flex", flexWrap: "wrap", alignItems: "center", gap: 0.75 }, children: sources.map((s, i) => /* @__PURE__ */ jsx5(SourceChip, { source: s }, `${s.url}-${i}`)) })
524
+ /* @__PURE__ */ jsx5(
525
+ Box3,
526
+ {
527
+ sx: {
528
+ display: "flex",
529
+ alignItems: "center",
530
+ // Overlapping stack; each chip lifts on hover (no reflow → no jitter).
531
+ "& .source-chip": { ml: "-9px" },
532
+ "& .source-chip:first-of-type": { ml: 0 }
533
+ },
534
+ children: sources.map((s, i) => /* @__PURE__ */ jsx5(SourceChip, { source: s }, `${s.url}-${i}`))
535
+ }
536
+ )
546
537
  ] });
547
538
  };
548
539
  var source_chips_default = SourceChips;
@@ -3839,6 +3830,15 @@ ${fn}(${argStr})
3839
3830
  \`\`\``;
3840
3831
  }
3841
3832
  }
3833
+ if (!/```(?:tool_code|TOOL_CODE)/.test(fullMessage)) {
3834
+ const plainToolFence = /```[a-zA-Z0-9_-]*[ \t]*\n([ \t]*(?:web_search|web_fetch|image_generation|create_file|ask_user)[\s\S]*?)\n```/;
3835
+ const fm = fullMessage.match(plainToolFence);
3836
+ if (fm) {
3837
+ fullMessage = fullMessage.replace(plainToolFence, `\`\`\`tool_code
3838
+ ${fm[1].trim()}
3839
+ \`\`\``);
3840
+ }
3841
+ }
3842
3842
  const toolCallMatches = fullMessage.match(/```(?:tool_code|TOOL_CODE)\s*\n([^`]+)\n```/gi);
3843
3843
  let enhancedMessage = fullMessage;
3844
3844
  const summarizableResults = [];
@@ -10617,4 +10617,4 @@ var chat_default = Chat;
10617
10617
  export {
10618
10618
  chat_default
10619
10619
  };
10620
- //# sourceMappingURL=chunk-JOY64M5C.mjs.map
10620
+ //# sourceMappingURL=chunk-C2SY64XM.mjs.map