@burtson-labs/bandit-engine 2.0.58 → 2.0.59
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-MXC6O7M5.mjs → chat-3J4GDGWW.mjs} +2 -2
- package/dist/{chunk-VU5N57QZ.mjs → chunk-URKUD3OL.mjs} +2 -2
- package/dist/{chunk-N7GCS2BH.mjs → chunk-V5QRXIIO.mjs} +33 -5
- package/dist/chunk-V5QRXIIO.mjs.map +1 -0
- package/dist/index.js +32 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +32 -4
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-N7GCS2BH.mjs.map +0 -1
- /package/dist/{chat-MXC6O7M5.mjs.map → chat-3J4GDGWW.mjs.map} +0 -0
- /package/dist/{chunk-VU5N57QZ.mjs.map → chunk-URKUD3OL.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
chat_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V5QRXIIO.mjs";
|
|
4
4
|
import "./chunk-ONQMRE2G.mjs";
|
|
5
5
|
import "./chunk-KM7FUWCM.mjs";
|
|
6
6
|
import "./chunk-QPBG6JQE.mjs";
|
|
@@ -13,4 +13,4 @@ import "./chunk-BJTO5JO5.mjs";
|
|
|
13
13
|
export {
|
|
14
14
|
chat_default as default
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chat-
|
|
16
|
+
//# sourceMappingURL=chat-3J4GDGWW.mjs.map
|
|
@@ -9459,7 +9459,7 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
|
|
|
9459
9459
|
|
|
9460
9460
|
// src/management/management.tsx
|
|
9461
9461
|
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
9462
|
-
var preloadChatPage = () => import("./chat-
|
|
9462
|
+
var preloadChatPage = () => import("./chat-3J4GDGWW.mjs");
|
|
9463
9463
|
var buildCapabilitiesUrl = (gatewayApiUrl) => {
|
|
9464
9464
|
const trimmed = gatewayApiUrl.replace(/\/$/, "");
|
|
9465
9465
|
if (trimmed.endsWith("/api")) {
|
|
@@ -10804,4 +10804,4 @@ export {
|
|
|
10804
10804
|
useGatewayMemory,
|
|
10805
10805
|
management_default
|
|
10806
10806
|
};
|
|
10807
|
-
//# sourceMappingURL=chunk-
|
|
10807
|
+
//# sourceMappingURL=chunk-URKUD3OL.mjs.map
|
|
@@ -2021,7 +2021,14 @@ var executeMCPTool = async (toolCall) => {
|
|
|
2021
2021
|
requestOptions.body = JSON.stringify(toolCall.parameters);
|
|
2022
2022
|
}
|
|
2023
2023
|
}
|
|
2024
|
-
const
|
|
2024
|
+
const controller = new AbortController();
|
|
2025
|
+
const timeoutId = setTimeout(() => controller.abort(), 3e4);
|
|
2026
|
+
let response;
|
|
2027
|
+
try {
|
|
2028
|
+
response = await fetch(url, { ...requestOptions, signal: controller.signal });
|
|
2029
|
+
} finally {
|
|
2030
|
+
clearTimeout(timeoutId);
|
|
2031
|
+
}
|
|
2025
2032
|
const data = await response.json();
|
|
2026
2033
|
if (!response.ok) {
|
|
2027
2034
|
debugLogger.error("MCP tool execution failed", {
|
|
@@ -3042,9 +3049,22 @@ Using these results together with your own knowledge, answer my original questio
|
|
|
3042
3049
|
options: { num_predict: tokenLimit + 250 }
|
|
3043
3050
|
};
|
|
3044
3051
|
clearFlushTimer();
|
|
3045
|
-
|
|
3052
|
+
const summaryPreamble = stripToolBlocks(fullMessage).trim();
|
|
3053
|
+
setStreamBuffer(
|
|
3054
|
+
summaryPreamble ? `${summaryPreamble}
|
|
3055
|
+
|
|
3056
|
+
_Working on it\u2026_` : "_Working on it\u2026_"
|
|
3057
|
+
);
|
|
3046
3058
|
const summaryText = await new Promise((resolve) => {
|
|
3047
3059
|
let acc = "";
|
|
3060
|
+
let settled = false;
|
|
3061
|
+
let timer;
|
|
3062
|
+
const done = (value) => {
|
|
3063
|
+
if (settled) return;
|
|
3064
|
+
settled = true;
|
|
3065
|
+
if (timer) clearTimeout(timer);
|
|
3066
|
+
resolve(value);
|
|
3067
|
+
};
|
|
3048
3068
|
const summarySub = provider.chat(summaryRequest).subscribe({
|
|
3049
3069
|
next: (data) => {
|
|
3050
3070
|
if (data?.message?.content) {
|
|
@@ -3059,11 +3079,19 @@ Using these results together with your own knowledge, answer my original questio
|
|
|
3059
3079
|
debugLogger.error("Summarization pass failed", {
|
|
3060
3080
|
error: summaryErr instanceof Error ? summaryErr.message : String(summaryErr)
|
|
3061
3081
|
});
|
|
3062
|
-
|
|
3082
|
+
done("");
|
|
3063
3083
|
},
|
|
3064
|
-
complete: () =>
|
|
3084
|
+
complete: () => done(stripThinking(acc).trim())
|
|
3065
3085
|
});
|
|
3066
3086
|
currentSubRef.current = summarySub;
|
|
3087
|
+
timer = setTimeout(() => {
|
|
3088
|
+
debugLogger.warn("Summarization pass timed out; using inline tool output");
|
|
3089
|
+
try {
|
|
3090
|
+
summarySub.unsubscribe();
|
|
3091
|
+
} catch {
|
|
3092
|
+
}
|
|
3093
|
+
done("");
|
|
3094
|
+
}, 3e4);
|
|
3067
3095
|
});
|
|
3068
3096
|
if (summaryText.trim()) {
|
|
3069
3097
|
enhancedMessage = summaryText + (inlineImageBlocks.length ? `
|
|
@@ -9220,4 +9248,4 @@ var chat_default = Chat;
|
|
|
9220
9248
|
export {
|
|
9221
9249
|
chat_default
|
|
9222
9250
|
};
|
|
9223
|
-
//# sourceMappingURL=chunk-
|
|
9251
|
+
//# sourceMappingURL=chunk-V5QRXIIO.mjs.map
|