@burtson-labs/bandit-engine 2.0.130 → 2.0.131

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-POQY66ZJ.mjs";
3
+ } from "./chunk-BVMTZTGQ.mjs";
4
4
  import "./chunk-ONQMRE2G.mjs";
5
5
  import "./chunk-BVYSGIWG.mjs";
6
6
  import "./chunk-K2JGFKEB.mjs";
@@ -13,4 +13,4 @@ import "./chunk-BJTO5JO5.mjs";
13
13
  export {
14
14
  chat_default as default
15
15
  };
16
- //# sourceMappingURL=chat-KITNRSFA.mjs.map
16
+ //# sourceMappingURL=chat-3O4KKYCG.mjs.map
@@ -722,6 +722,18 @@ var source_chips_default = SourceChips;
722
722
  // src/chat/chat-messages.tsx
723
723
  import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
724
724
  var WORKING_TOKEN_RE = /\s*<<working:([^>]*)>>\s*$/;
725
+ var BYTE_TOKEN_RUN_RE = /(?:<0x[0-9A-Fa-f]{2}>)+/g;
726
+ var decodeByteTokens = (text) => {
727
+ if (!text || text.indexOf("<0x") === -1) return text;
728
+ return text.replace(BYTE_TOKEN_RUN_RE, (run) => {
729
+ const bytes = Array.from(run.matchAll(/<0x([0-9A-Fa-f]{2})>/g), (m) => parseInt(m[1], 16));
730
+ try {
731
+ return new TextDecoder("utf-8", { fatal: true }).decode(new Uint8Array(bytes));
732
+ } catch {
733
+ return "";
734
+ }
735
+ });
736
+ };
725
737
  var ToolWorkingChip = ({ label }) => /* @__PURE__ */ jsxs3(
726
738
  Box4,
727
739
  {
@@ -772,7 +784,7 @@ var ChatMessages = ({
772
784
  const lastIndex = history.length - 1;
773
785
  const hasActivePlaceholder = lastIndex >= 0 && history[lastIndex]?.answer === "...";
774
786
  if (!responseStarted && !pendingMessage && history.length === 0) return null;
775
- return /* @__PURE__ */ jsxs3(Box4, { sx: { px: isMobile ? 0 : 0, pt: "100px", display: "flex", flexDirection: "column", gap: 2 }, children: [
787
+ return /* @__PURE__ */ jsxs3(Box4, { sx: { px: isMobile ? 0 : 0, pt: "calc(100px + env(safe-area-inset-top, 0px))", display: "flex", flexDirection: "column", gap: 2 }, children: [
776
788
  history.map((entry, index) => {
777
789
  const isLast = index === lastIndex;
778
790
  const isPlaceholder = entry.answer === "...";
@@ -780,7 +792,9 @@ var ChatMessages = ({
780
792
  const showThinking = showLoader && isThinking;
781
793
  const rawContent = isLast ? isStreaming ? streamBuffer || "" : isPlaceholder ? "" : entry.answer : entry.answer;
782
794
  const workingMatch = isLast && isStreaming ? rawContent.match(WORKING_TOKEN_RE) : null;
783
- const content = workingMatch ? rawContent.replace(WORKING_TOKEN_RE, "") : rawContent;
795
+ const content = decodeByteTokens(
796
+ workingMatch ? rawContent.replace(WORKING_TOKEN_RE, "") : rawContent
797
+ );
784
798
  const rawSources = entry.sourceFiles;
785
799
  const sourceSummaries = rawSources ? rawSources.filter((doc) => doc && typeof doc.name === "string" && doc.name.trim()).map((doc) => ({ id: doc.id || doc.name, name: doc.name.trim() })) : void 0;
786
800
  const responseNode = /* @__PURE__ */ jsxs3(
@@ -8250,7 +8264,10 @@ var EnhancedMobileConversationsModal = ({
8250
8264
  display: "flex",
8251
8265
  flexDirection: "column",
8252
8266
  overflow: "hidden",
8253
- outline: "none"
8267
+ outline: "none",
8268
+ // Edge-to-edge PWA: the drawer surface runs under the status
8269
+ // bar (like Claude); its content starts below it.
8270
+ pt: "env(safe-area-inset-top, 0px)"
8254
8271
  },
8255
8272
  children: [
8256
8273
  /* @__PURE__ */ jsx17(
@@ -9117,6 +9134,8 @@ var ChatAppBar = ({
9117
9134
  width: "100%",
9118
9135
  px: 2,
9119
9136
  py: 1,
9137
+ // Edge-to-edge PWA: keep the pills below the status bar / notch.
9138
+ pt: "calc(8px + env(safe-area-inset-top, 0px))",
9120
9139
  display: "flex",
9121
9140
  alignItems: "center",
9122
9141
  justifyContent: "space-between",
@@ -11535,4 +11554,4 @@ var chat_default = Chat;
11535
11554
  export {
11536
11555
  chat_default
11537
11556
  };
11538
- //# sourceMappingURL=chunk-POQY66ZJ.mjs.map
11557
+ //# sourceMappingURL=chunk-BVMTZTGQ.mjs.map