@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.
- package/dist/{chat-KITNRSFA.mjs → chat-3O4KKYCG.mjs} +2 -2
- package/dist/{chunk-POQY66ZJ.mjs → chunk-BVMTZTGQ.mjs} +23 -4
- package/dist/chunk-BVMTZTGQ.mjs.map +1 -0
- package/dist/{chunk-R7LKVTK7.mjs → chunk-VNIDC6VZ.mjs} +54 -32
- package/dist/chunk-VNIDC6VZ.mjs.map +1 -0
- package/dist/index.js +42 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +42 -5
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-POQY66ZJ.mjs.map +0 -1
- package/dist/chunk-R7LKVTK7.mjs.map +0 -1
- /package/dist/{chat-KITNRSFA.mjs.map → chat-3O4KKYCG.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -15755,7 +15755,7 @@ var init_source_chips = __esm({
|
|
|
15755
15755
|
});
|
|
15756
15756
|
|
|
15757
15757
|
// src/chat/chat-messages.tsx
|
|
15758
|
-
var import_material12, import_jsx_runtime15, WORKING_TOKEN_RE, ToolWorkingChip, ChatMessages, chat_messages_default;
|
|
15758
|
+
var import_material12, import_jsx_runtime15, WORKING_TOKEN_RE, BYTE_TOKEN_RUN_RE, decodeByteTokens, ToolWorkingChip, ChatMessages, chat_messages_default;
|
|
15759
15759
|
var init_chat_messages = __esm({
|
|
15760
15760
|
"src/chat/chat-messages.tsx"() {
|
|
15761
15761
|
"use strict";
|
|
@@ -15766,6 +15766,18 @@ var init_chat_messages = __esm({
|
|
|
15766
15766
|
init_conversationStore();
|
|
15767
15767
|
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
15768
15768
|
WORKING_TOKEN_RE = /\s*<<working:([^>]*)>>\s*$/;
|
|
15769
|
+
BYTE_TOKEN_RUN_RE = /(?:<0x[0-9A-Fa-f]{2}>)+/g;
|
|
15770
|
+
decodeByteTokens = (text) => {
|
|
15771
|
+
if (!text || text.indexOf("<0x") === -1) return text;
|
|
15772
|
+
return text.replace(BYTE_TOKEN_RUN_RE, (run) => {
|
|
15773
|
+
const bytes = Array.from(run.matchAll(/<0x([0-9A-Fa-f]{2})>/g), (m) => parseInt(m[1], 16));
|
|
15774
|
+
try {
|
|
15775
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(new Uint8Array(bytes));
|
|
15776
|
+
} catch {
|
|
15777
|
+
return "";
|
|
15778
|
+
}
|
|
15779
|
+
});
|
|
15780
|
+
};
|
|
15769
15781
|
ToolWorkingChip = ({ label }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
15770
15782
|
import_material12.Box,
|
|
15771
15783
|
{
|
|
@@ -15816,7 +15828,7 @@ var init_chat_messages = __esm({
|
|
|
15816
15828
|
const lastIndex = history.length - 1;
|
|
15817
15829
|
const hasActivePlaceholder = lastIndex >= 0 && history[lastIndex]?.answer === "...";
|
|
15818
15830
|
if (!responseStarted && !pendingMessage && history.length === 0) return null;
|
|
15819
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_material12.Box, { sx: { px: isMobile ? 0 : 0, pt: "100px", display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
15831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_material12.Box, { sx: { px: isMobile ? 0 : 0, pt: "calc(100px + env(safe-area-inset-top, 0px))", display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
15820
15832
|
history.map((entry, index) => {
|
|
15821
15833
|
const isLast = index === lastIndex;
|
|
15822
15834
|
const isPlaceholder = entry.answer === "...";
|
|
@@ -15824,7 +15836,9 @@ var init_chat_messages = __esm({
|
|
|
15824
15836
|
const showThinking = showLoader && isThinking;
|
|
15825
15837
|
const rawContent = isLast ? isStreaming ? streamBuffer || "" : isPlaceholder ? "" : entry.answer : entry.answer;
|
|
15826
15838
|
const workingMatch = isLast && isStreaming ? rawContent.match(WORKING_TOKEN_RE) : null;
|
|
15827
|
-
const content =
|
|
15839
|
+
const content = decodeByteTokens(
|
|
15840
|
+
workingMatch ? rawContent.replace(WORKING_TOKEN_RE, "") : rawContent
|
|
15841
|
+
);
|
|
15828
15842
|
const rawSources = entry.sourceFiles;
|
|
15829
15843
|
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;
|
|
15830
15844
|
const responseNode = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
@@ -26023,7 +26037,10 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
26023
26037
|
display: "flex",
|
|
26024
26038
|
flexDirection: "column",
|
|
26025
26039
|
overflow: "hidden",
|
|
26026
|
-
outline: "none"
|
|
26040
|
+
outline: "none",
|
|
26041
|
+
// Edge-to-edge PWA: the drawer surface runs under the status
|
|
26042
|
+
// bar (like Claude); its content starts below it.
|
|
26043
|
+
pt: "env(safe-area-inset-top, 0px)"
|
|
26027
26044
|
},
|
|
26028
26045
|
children: [
|
|
26029
26046
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
@@ -26912,6 +26929,8 @@ var init_chat_app_bar = __esm({
|
|
|
26912
26929
|
width: "100%",
|
|
26913
26930
|
px: 2,
|
|
26914
26931
|
py: 1,
|
|
26932
|
+
// Edge-to-edge PWA: keep the pills below the status bar / notch.
|
|
26933
|
+
pt: "calc(8px + env(safe-area-inset-top, 0px))",
|
|
26915
26934
|
display: "flex",
|
|
26916
26935
|
alignItems: "center",
|
|
26917
26936
|
justifyContent: "space-between",
|
|
@@ -37321,7 +37340,12 @@ var PreferencesTab = ({
|
|
|
37321
37340
|
const timeoutRef = (0, import_react53.useRef)(null);
|
|
37322
37341
|
const fileInputRef = (0, import_react53.useRef)(null);
|
|
37323
37342
|
const { exportPreferences, importPreferences, resetToDefaults } = usePreferencesStore();
|
|
37324
|
-
const {
|
|
37343
|
+
const {
|
|
37344
|
+
isServiceAvailable: isTTSSTTAvailable,
|
|
37345
|
+
availableVoices,
|
|
37346
|
+
selectedVoice,
|
|
37347
|
+
setSelectedVoice
|
|
37348
|
+
} = useVoiceStore();
|
|
37325
37349
|
const { hasAdvancedSearch, hasAdvancedMemories } = useFeatures();
|
|
37326
37350
|
const {
|
|
37327
37351
|
initialized: syncInitialized,
|
|
@@ -37941,6 +37965,19 @@ var PreferencesTab = ({
|
|
|
37941
37965
|
] })
|
|
37942
37966
|
}
|
|
37943
37967
|
),
|
|
37968
|
+
preferences.ttsEnabled && isTTSSTTAvailable && availableVoices.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.FormControl, { size: "small", sx: { ml: 6, mt: 1, maxWidth: 280 }, children: [
|
|
37969
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.InputLabel, { id: "tts-voice-label", children: "Voice" }),
|
|
37970
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
37971
|
+
import_material44.Select,
|
|
37972
|
+
{
|
|
37973
|
+
labelId: "tts-voice-label",
|
|
37974
|
+
label: "Voice",
|
|
37975
|
+
value: availableVoices.includes(selectedVoice) ? selectedVoice : "",
|
|
37976
|
+
onChange: (e) => setSelectedVoice(e.target.value),
|
|
37977
|
+
children: availableVoices.map((voice) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.MenuItem, { value: voice, children: voice.split("-")[1] ? voice.split("-")[1].charAt(0).toUpperCase() + voice.split("-")[1].slice(1) : voice }, voice))
|
|
37978
|
+
}
|
|
37979
|
+
)
|
|
37980
|
+
] }),
|
|
37944
37981
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
37945
37982
|
import_material44.FormControlLabel,
|
|
37946
37983
|
{
|