@burtson-labs/bandit-engine 2.0.149 → 2.0.151
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/{aiProviderStore-FTD277QP.mjs → aiProviderStore-ZQ5VVVKQ.mjs} +2 -2
- package/dist/chat-3HV3GM5P.mjs +16 -0
- package/dist/chat-provider.js +5 -2
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +5 -5
- package/dist/{chunk-P5IJLX6I.mjs → chunk-6STVJJSG.mjs} +4 -2
- package/dist/chunk-6STVJJSG.mjs.map +1 -0
- package/dist/{chunk-K2JGFKEB.mjs → chunk-CVFFNX7H.mjs} +2 -2
- package/dist/{chunk-JQSZNGII.mjs → chunk-DSYE5AHW.mjs} +9 -9
- package/dist/{chunk-43MLINPL.mjs → chunk-GWQRTUKF.mjs} +6 -3
- package/dist/chunk-GWQRTUKF.mjs.map +1 -0
- package/dist/{chunk-PU74BI6Y.mjs → chunk-QLATFSSO.mjs} +5 -5
- package/dist/{chunk-F7JXIW6T.mjs → chunk-RRCCSN3N.mjs} +2 -2
- package/dist/{chunk-F735W34E.mjs → chunk-TYRYAAP2.mjs} +38 -3
- package/dist/chunk-TYRYAAP2.mjs.map +1 -0
- package/dist/{chunk-K6IV4LYZ.mjs → chunk-U33KBX3Y.mjs} +4 -4
- package/dist/{chunk-NLBZZP3B.mjs → chunk-VLUXQE24.mjs} +3 -3
- package/dist/{chunk-ANX33XAO.mjs → chunk-ZRJYLJKZ.mjs} +65 -22
- package/dist/chunk-ZRJYLJKZ.mjs.map +1 -0
- package/dist/index.js +142 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/management/management.js +136 -46
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +8 -8
- package/dist/modals/chat-modal/chat-modal.js +40 -2
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +4 -4
- package/package.json +1 -1
- package/dist/chat-Z4SQGSMN.mjs +0 -16
- package/dist/chunk-43MLINPL.mjs.map +0 -1
- package/dist/chunk-ANX33XAO.mjs.map +0 -1
- package/dist/chunk-F735W34E.mjs.map +0 -1
- package/dist/chunk-P5IJLX6I.mjs.map +0 -1
- /package/dist/{aiProviderStore-FTD277QP.mjs.map → aiProviderStore-ZQ5VVVKQ.mjs.map} +0 -0
- /package/dist/{chat-Z4SQGSMN.mjs.map → chat-3HV3GM5P.mjs.map} +0 -0
- /package/dist/{chunk-K2JGFKEB.mjs.map → chunk-CVFFNX7H.mjs.map} +0 -0
- /package/dist/{chunk-JQSZNGII.mjs.map → chunk-DSYE5AHW.mjs.map} +0 -0
- /package/dist/{chunk-PU74BI6Y.mjs.map → chunk-QLATFSSO.mjs.map} +0 -0
- /package/dist/{chunk-F7JXIW6T.mjs.map → chunk-RRCCSN3N.mjs.map} +0 -0
- /package/dist/{chunk-K6IV4LYZ.mjs.map → chunk-U33KBX3Y.mjs.map} +0 -0
- /package/dist/{chunk-NLBZZP3B.mjs.map → chunk-VLUXQE24.mjs.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useMemoryStore,
|
|
7
7
|
useNotification,
|
|
8
8
|
useVectorStore
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VLUXQE24.mjs";
|
|
10
10
|
import {
|
|
11
11
|
useModelStore,
|
|
12
12
|
usePackageSettingsStore,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
GatewayService,
|
|
17
17
|
authenticationService
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GWQRTUKF.mjs";
|
|
19
19
|
import {
|
|
20
20
|
debugLogger
|
|
21
21
|
} from "./chunk-KCI46M23.mjs";
|
|
@@ -2540,6 +2540,39 @@ import {
|
|
|
2540
2540
|
Paper as Paper2
|
|
2541
2541
|
} from "@mui/material";
|
|
2542
2542
|
|
|
2543
|
+
// src/utils/openFileLink.ts
|
|
2544
|
+
var FILE_EXT_RE = /\.(docx|pptx|xlsx|csv|json|md|txt|html|xml|ya?ml|pdf|zip)(?:[?#]|$)/i;
|
|
2545
|
+
var isStandalonePwa = () => typeof window !== "undefined" && (window.matchMedia?.("(display-mode: standalone)").matches || window.navigator.standalone === true);
|
|
2546
|
+
var isFileLink = (href) => Boolean(href && FILE_EXT_RE.test(href));
|
|
2547
|
+
var maybeHandleFileLinkClick = (event, href) => {
|
|
2548
|
+
if (!href || !isStandalonePwa() || !isFileLink(href)) return;
|
|
2549
|
+
event.preventDefault();
|
|
2550
|
+
void (async () => {
|
|
2551
|
+
try {
|
|
2552
|
+
const res = await fetch(href);
|
|
2553
|
+
if (!res.ok) throw new Error(`fetch ${res.status}`);
|
|
2554
|
+
const blob = await res.blob();
|
|
2555
|
+
const rawName = new URL(href, window.location.href).pathname.split("/").pop() || "download";
|
|
2556
|
+
const name = decodeURIComponent(rawName);
|
|
2557
|
+
const file = new File([blob], name, {
|
|
2558
|
+
type: blob.type || "application/octet-stream"
|
|
2559
|
+
});
|
|
2560
|
+
const nav = navigator;
|
|
2561
|
+
if (nav.canShare?.({ files: [file] }) && nav.share) {
|
|
2562
|
+
await nav.share({ files: [file], title: name });
|
|
2563
|
+
return;
|
|
2564
|
+
}
|
|
2565
|
+
window.location.href = URL.createObjectURL(blob);
|
|
2566
|
+
} catch (error) {
|
|
2567
|
+
debugLogger.warn("openFileLink: share flow failed, falling back", {
|
|
2568
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2569
|
+
});
|
|
2570
|
+
if (error?.name === "AbortError") return;
|
|
2571
|
+
window.open(href, "_blank", "noopener");
|
|
2572
|
+
}
|
|
2573
|
+
})();
|
|
2574
|
+
};
|
|
2575
|
+
|
|
2543
2576
|
// src/modals/chat-modal/ai-response-action-bar.tsx
|
|
2544
2577
|
import { useState as useState4, useEffect as useEffect4 } from "react";
|
|
2545
2578
|
import { Box as Box4, CircularProgress as CircularProgress2, IconButton as IconButton3, Tooltip as Tooltip3 } from "@mui/material";
|
|
@@ -3173,6 +3206,7 @@ ${sourcesMarkdownList.join("\n")}`;
|
|
|
3173
3206
|
},
|
|
3174
3207
|
target: "_blank",
|
|
3175
3208
|
rel: "noopener noreferrer",
|
|
3209
|
+
onClick: (e) => maybeHandleFileLinkClick(e, href),
|
|
3176
3210
|
children
|
|
3177
3211
|
}
|
|
3178
3212
|
);
|
|
@@ -8747,6 +8781,7 @@ export {
|
|
|
8747
8781
|
MinimizeIcon,
|
|
8748
8782
|
DragIndicatorIcon,
|
|
8749
8783
|
MicIcon,
|
|
8784
|
+
maybeHandleFileLinkClick,
|
|
8750
8785
|
DocumentCard_default,
|
|
8751
8786
|
knowledge_file_modal_default,
|
|
8752
8787
|
VoiceService,
|
|
@@ -8771,4 +8806,4 @@ export {
|
|
|
8771
8806
|
themeMap_default,
|
|
8772
8807
|
useNotificationService
|
|
8773
8808
|
};
|
|
8774
|
-
//# sourceMappingURL=chunk-
|
|
8809
|
+
//# sourceMappingURL=chunk-TYRYAAP2.mjs.map
|