blun-king-cli 9.1.223 → 9.1.224
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/blun.mjs +5 -1
- package/package.json +1 -1
package/blun.mjs
CHANGED
|
@@ -261015,6 +261015,10 @@ function blunThinkingIntentInput(input) {
|
|
|
261015
261015
|
function blunTurnHasAttachment(input) {
|
|
261016
261016
|
return input.some((part) => part.type !== "text") || BLUN_ATTACHMENT_MARKER_RE.test(blunExtractText(input));
|
|
261017
261017
|
}
|
|
261018
|
+
function blunTurnNeedsInitialMcp(input, origin) {
|
|
261019
|
+
if (blunTurnNeedsTools(input, origin)) return true;
|
|
261020
|
+
return BLUN_TELEGRAM_CHANNEL_RE.test(blunExtractText(input)) || blunTurnHasAttachment(input);
|
|
261021
|
+
}
|
|
261018
261022
|
function blunMessageTextChars(message) {
|
|
261019
261023
|
return message.content.reduce((total, part) => total + (part.type === "text" ? part.text.length : 0), 0);
|
|
261020
261024
|
}
|
|
@@ -261912,7 +261916,7 @@ var init_turn = __esmMin((() => {
|
|
|
261912
261916
|
let stopHookContinuationUsed = false;
|
|
261913
261917
|
let goalOutcomeMessageContinuationUsed = false;
|
|
261914
261918
|
const deduper = new ToolCallDeduplicator({ telemetry: this.agent.telemetry });
|
|
261915
|
-
await this.agent.mcp?.waitForInitialLoad(signal);
|
|
261919
|
+
if (blunTurnNeedsInitialMcp(input, origin)) await this.agent.mcp?.waitForInitialLoad(signal);
|
|
261916
261920
|
const personalMemoryRecall = await this.agent.injection.injectPersonalMemoryForTurn(turnId, input, origin, signal);
|
|
261917
261921
|
await this.agent.injection.injectGoal();
|
|
261918
261922
|
this.setActiveSteerAcceptance(turnId, true);
|