@burtson-labs/bandit-engine 2.0.130 → 2.0.132

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-7KFVACAY.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-56LDJSBR.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",
@@ -9722,7 +9741,7 @@ var UnderReview_default = UnderReview;
9722
9741
  import { useEffect as useEffect15, useRef as useRef13, useState as useState18 } from "react";
9723
9742
  import { Box as Box18, IconButton as IconButton13, Paper as Paper2, Slide as Slide2, Typography as Typography14 } from "@mui/material";
9724
9743
  import { useTheme as useTheme18, alpha as alpha11 } from "@mui/material/styles";
9725
- import { X as CloseIcon8 } from "lucide-react";
9744
+ import { X as CloseIcon8, Smile as SmileIcon, Meh as MehIcon, Frown as FrownIcon } from "lucide-react";
9726
9745
  import { Fragment as Fragment12, jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
9727
9746
  var STORAGE_KEY2 = "bandit-feedback-pulse-last";
9728
9747
  var COOLDOWN_DAYS = 14;
@@ -9797,7 +9816,7 @@ var FeedbackPulse = ({ isMobile, feedbackEmail }) => {
9797
9816
  recordInteraction("dismissed");
9798
9817
  setVisible(false);
9799
9818
  };
9800
- const choice = (emoji, label, outcome) => /* @__PURE__ */ jsxs17(
9819
+ const choice = (icon, label, outcome) => /* @__PURE__ */ jsxs17(
9801
9820
  Box18,
9802
9821
  {
9803
9822
  component: "button",
@@ -9824,7 +9843,7 @@ var FeedbackPulse = ({ isMobile, feedbackEmail }) => {
9824
9843
  "&:active": { transform: "scale(0.96)" }
9825
9844
  },
9826
9845
  children: [
9827
- /* @__PURE__ */ jsx21(Box18, { component: "span", sx: { fontSize: "1.3rem", lineHeight: 1 }, children: emoji }),
9846
+ /* @__PURE__ */ jsx21(Box18, { component: "span", sx: { display: "inline-flex", lineHeight: 1 }, children: icon }),
9828
9847
  /* @__PURE__ */ jsx21(Typography14, { variant: "caption", sx: { fontWeight: 600 }, children: label })
9829
9848
  ]
9830
9849
  }
@@ -9849,15 +9868,15 @@ var FeedbackPulse = ({ isMobile, feedbackEmail }) => {
9849
9868
  bgcolor: theme.palette.background.paper,
9850
9869
  boxShadow: `0 12px 40px ${alpha11(theme.palette.common.black, theme.palette.mode === "dark" ? 0.5 : 0.18)}`
9851
9870
  },
9852
- children: thanked ? /* @__PURE__ */ jsx21(Typography14, { sx: { textAlign: "center", py: 1.5, fontWeight: 600 }, children: "Thanks for the feedback! \u{1F64C}" }) : /* @__PURE__ */ jsxs17(Fragment12, { children: [
9871
+ children: thanked ? /* @__PURE__ */ jsx21(Typography14, { sx: { textAlign: "center", py: 1.5, fontWeight: 600 }, children: "Thanks for the feedback!" }) : /* @__PURE__ */ jsxs17(Fragment12, { children: [
9853
9872
  /* @__PURE__ */ jsxs17(Box18, { sx: { display: "flex", alignItems: "center", mb: 0.5 }, children: [
9854
9873
  /* @__PURE__ */ jsx21(Typography14, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: "How's Bandit doing?" }),
9855
9874
  /* @__PURE__ */ jsx21(IconButton13, { size: "small", onClick: dismiss, "aria-label": "Dismiss feedback prompt", children: /* @__PURE__ */ jsx21(CloseIcon8, { size: 16 }) })
9856
9875
  ] }),
9857
9876
  /* @__PURE__ */ jsxs17(Box18, { sx: { display: "flex", justifyContent: "space-evenly" }, children: [
9858
- choice("\u{1F60A}", "Good", "good"),
9859
- choice("\u{1F610}", "Fine", "fine"),
9860
- choice("\u{1F641}", "Bad", "bad")
9877
+ choice(/* @__PURE__ */ jsx21(SmileIcon, { size: 22, color: theme.palette.success.main }), "Good", "good"),
9878
+ choice(/* @__PURE__ */ jsx21(MehIcon, { size: 22, color: theme.palette.warning.main }), "Fine", "fine"),
9879
+ choice(/* @__PURE__ */ jsx21(FrownIcon, { size: 22, color: theme.palette.error.main }), "Bad", "bad")
9861
9880
  ] })
9862
9881
  ] })
9863
9882
  }
@@ -10248,6 +10267,7 @@ var useVoiceMode = (config) => {
10248
10267
  };
10249
10268
 
10250
10269
  // src/chat/chat.tsx
10270
+ import { Ghost as TempChatGhostIcon } from "lucide-react";
10251
10271
  import { Fragment as Fragment13, jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
10252
10272
  var ChatContent = () => {
10253
10273
  const packageSettings = usePackageSettingsStore((state) => state.settings);
@@ -11283,7 +11303,7 @@ var ChatContent = () => {
11283
11303
  whiteSpace: "nowrap"
11284
11304
  }),
11285
11305
  children: [
11286
- /* @__PURE__ */ jsx23(Box20, { component: "span", "aria-hidden": true, sx: { fontSize: "0.9rem", lineHeight: 1 }, children: "\u{1F47B}" }),
11306
+ /* @__PURE__ */ jsx23(TempChatGhostIcon, { size: 14, "aria-hidden": true }),
11287
11307
  "Temporary chat",
11288
11308
  /* @__PURE__ */ jsx23(
11289
11309
  Box20,
@@ -11535,4 +11555,4 @@ var chat_default = Chat;
11535
11555
  export {
11536
11556
  chat_default
11537
11557
  };
11538
- //# sourceMappingURL=chunk-POQY66ZJ.mjs.map
11558
+ //# sourceMappingURL=chunk-7KFVACAY.mjs.map