@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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
chat_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BVMTZTGQ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
chat_provider_default
|
|
6
6
|
} from "./chunk-PU74BI6Y.mjs";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useGatewayHealth,
|
|
11
11
|
useGatewayMemory,
|
|
12
12
|
useGatewayModels
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VNIDC6VZ.mjs";
|
|
14
14
|
import "./chunk-BVYSGIWG.mjs";
|
|
15
15
|
import "./chunk-F7JXIW6T.mjs";
|
|
16
16
|
import "./chunk-K2JGFKEB.mjs";
|
|
@@ -20437,7 +20437,7 @@ var init_source_chips = __esm({
|
|
|
20437
20437
|
});
|
|
20438
20438
|
|
|
20439
20439
|
// src/chat/chat-messages.tsx
|
|
20440
|
-
var import_material36, import_jsx_runtime36, WORKING_TOKEN_RE, ToolWorkingChip, ChatMessages, chat_messages_default;
|
|
20440
|
+
var import_material36, import_jsx_runtime36, WORKING_TOKEN_RE, BYTE_TOKEN_RUN_RE, decodeByteTokens, ToolWorkingChip, ChatMessages, chat_messages_default;
|
|
20441
20441
|
var init_chat_messages = __esm({
|
|
20442
20442
|
"src/chat/chat-messages.tsx"() {
|
|
20443
20443
|
"use strict";
|
|
@@ -20448,6 +20448,18 @@ var init_chat_messages = __esm({
|
|
|
20448
20448
|
init_conversationStore();
|
|
20449
20449
|
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
20450
20450
|
WORKING_TOKEN_RE = /\s*<<working:([^>]*)>>\s*$/;
|
|
20451
|
+
BYTE_TOKEN_RUN_RE = /(?:<0x[0-9A-Fa-f]{2}>)+/g;
|
|
20452
|
+
decodeByteTokens = (text) => {
|
|
20453
|
+
if (!text || text.indexOf("<0x") === -1) return text;
|
|
20454
|
+
return text.replace(BYTE_TOKEN_RUN_RE, (run) => {
|
|
20455
|
+
const bytes = Array.from(run.matchAll(/<0x([0-9A-Fa-f]{2})>/g), (m) => parseInt(m[1], 16));
|
|
20456
|
+
try {
|
|
20457
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(new Uint8Array(bytes));
|
|
20458
|
+
} catch {
|
|
20459
|
+
return "";
|
|
20460
|
+
}
|
|
20461
|
+
});
|
|
20462
|
+
};
|
|
20451
20463
|
ToolWorkingChip = ({ label }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
20452
20464
|
import_material36.Box,
|
|
20453
20465
|
{
|
|
@@ -20498,7 +20510,7 @@ var init_chat_messages = __esm({
|
|
|
20498
20510
|
const lastIndex = history.length - 1;
|
|
20499
20511
|
const hasActivePlaceholder = lastIndex >= 0 && history[lastIndex]?.answer === "...";
|
|
20500
20512
|
if (!responseStarted && !pendingMessage && history.length === 0) return null;
|
|
20501
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_material36.Box, { sx: { px: isMobile ? 0 : 0, pt: "100px", display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
20513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_material36.Box, { sx: { px: isMobile ? 0 : 0, pt: "calc(100px + env(safe-area-inset-top, 0px))", display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
20502
20514
|
history.map((entry, index) => {
|
|
20503
20515
|
const isLast = index === lastIndex;
|
|
20504
20516
|
const isPlaceholder = entry.answer === "...";
|
|
@@ -20506,7 +20518,9 @@ var init_chat_messages = __esm({
|
|
|
20506
20518
|
const showThinking = showLoader && isThinking;
|
|
20507
20519
|
const rawContent = isLast ? isStreaming ? streamBuffer || "" : isPlaceholder ? "" : entry.answer : entry.answer;
|
|
20508
20520
|
const workingMatch = isLast && isStreaming ? rawContent.match(WORKING_TOKEN_RE) : null;
|
|
20509
|
-
const content =
|
|
20521
|
+
const content = decodeByteTokens(
|
|
20522
|
+
workingMatch ? rawContent.replace(WORKING_TOKEN_RE, "") : rawContent
|
|
20523
|
+
);
|
|
20510
20524
|
const rawSources = entry.sourceFiles;
|
|
20511
20525
|
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;
|
|
20512
20526
|
const responseNode = /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
@@ -28116,7 +28130,10 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28116
28130
|
display: "flex",
|
|
28117
28131
|
flexDirection: "column",
|
|
28118
28132
|
overflow: "hidden",
|
|
28119
|
-
outline: "none"
|
|
28133
|
+
outline: "none",
|
|
28134
|
+
// Edge-to-edge PWA: the drawer surface runs under the status
|
|
28135
|
+
// bar (like Claude); its content starts below it.
|
|
28136
|
+
pt: "env(safe-area-inset-top, 0px)"
|
|
28120
28137
|
},
|
|
28121
28138
|
children: [
|
|
28122
28139
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -29005,6 +29022,8 @@ var init_chat_app_bar = __esm({
|
|
|
29005
29022
|
width: "100%",
|
|
29006
29023
|
px: 2,
|
|
29007
29024
|
py: 1,
|
|
29025
|
+
// Edge-to-edge PWA: keep the pills below the status bar / notch.
|
|
29026
|
+
pt: "calc(8px + env(safe-area-inset-top, 0px))",
|
|
29008
29027
|
display: "flex",
|
|
29009
29028
|
alignItems: "center",
|
|
29010
29029
|
justifyContent: "space-between",
|
|
@@ -36384,7 +36403,12 @@ var PreferencesTab = ({
|
|
|
36384
36403
|
const timeoutRef = (0, import_react27.useRef)(null);
|
|
36385
36404
|
const fileInputRef = (0, import_react27.useRef)(null);
|
|
36386
36405
|
const { exportPreferences, importPreferences, resetToDefaults } = usePreferencesStore();
|
|
36387
|
-
const {
|
|
36406
|
+
const {
|
|
36407
|
+
isServiceAvailable: isTTSSTTAvailable,
|
|
36408
|
+
availableVoices,
|
|
36409
|
+
selectedVoice,
|
|
36410
|
+
setSelectedVoice
|
|
36411
|
+
} = useVoiceStore();
|
|
36388
36412
|
const { hasAdvancedSearch, hasAdvancedMemories } = useFeatures();
|
|
36389
36413
|
const {
|
|
36390
36414
|
initialized: syncInitialized,
|
|
@@ -37004,6 +37028,19 @@ var PreferencesTab = ({
|
|
|
37004
37028
|
] })
|
|
37005
37029
|
}
|
|
37006
37030
|
),
|
|
37031
|
+
preferences.ttsEnabled && isTTSSTTAvailable && availableVoices.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_material20.FormControl, { size: "small", sx: { ml: 6, mt: 1, maxWidth: 280 }, children: [
|
|
37032
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material20.InputLabel, { id: "tts-voice-label", children: "Voice" }),
|
|
37033
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
37034
|
+
import_material20.Select,
|
|
37035
|
+
{
|
|
37036
|
+
labelId: "tts-voice-label",
|
|
37037
|
+
label: "Voice",
|
|
37038
|
+
value: availableVoices.includes(selectedVoice) ? selectedVoice : "",
|
|
37039
|
+
onChange: (e) => setSelectedVoice(e.target.value),
|
|
37040
|
+
children: availableVoices.map((voice) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material20.MenuItem, { value: voice, children: voice.split("-")[1] ? voice.split("-")[1].charAt(0).toUpperCase() + voice.split("-")[1].slice(1) : voice }, voice))
|
|
37041
|
+
}
|
|
37042
|
+
)
|
|
37043
|
+
] }),
|
|
37007
37044
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
37008
37045
|
import_material20.FormControlLabel,
|
|
37009
37046
|
{
|