blun-king-cli 9.1.633 → 9.1.634
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
|
@@ -515932,7 +515932,11 @@ var init_strip_control_tokens = __esmMin((() => {
|
|
|
515932
515932
|
/** Remove model-only envelopes before assistant text reaches a transcript renderer. */
|
|
515933
515933
|
function sanitizeAssistantDisplayText(text, options = {}) {
|
|
515934
515934
|
const transient = options.transient === true;
|
|
515935
|
-
|
|
515935
|
+
const displayText = stripIncompleteInternalSuffix(stripControlTokens(stripDsmlBlocks(stripSystemReminderBlocks(stripEchoedRuntimeInstructions(text), transient))), transient);
|
|
515936
|
+
const sentinel = "[[BLUN_TELEGRAM_SILENT]]";
|
|
515937
|
+
const candidate = displayText.trim();
|
|
515938
|
+
if (candidate === sentinel || transient && candidate.length > 0 && sentinel.startsWith(candidate)) return "";
|
|
515939
|
+
return displayText;
|
|
515936
515940
|
}
|
|
515937
515941
|
function stripEchoedRuntimeInstructions(text) {
|
|
515938
515942
|
let cursor = 0;
|