@adhdev/daemon-standalone 0.9.14 → 0.9.15
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/index.js
CHANGED
|
@@ -29832,6 +29832,11 @@ var require_dist2 = __commonJS({
|
|
|
29832
29832
|
function normalizeComparableTranscriptText(value) {
|
|
29833
29833
|
return sanitizeTerminalText(String(value || "")).replace(/\s+/g, " ").trim();
|
|
29834
29834
|
}
|
|
29835
|
+
function hasVisibleInterruptPrompt(text) {
|
|
29836
|
+
return /\bEnter\s+to\s+interrupt\b(?:\s*,?\s*Ctrl\s*(?:\+|-)?\s*C\s+to\s+cancel)?/i.test(
|
|
29837
|
+
sanitizeTerminalText(text || "")
|
|
29838
|
+
);
|
|
29839
|
+
}
|
|
29835
29840
|
function parsedTranscriptIsRicherThanCommitted(parsedMessages, committedMessages) {
|
|
29836
29841
|
if (!Array.isArray(parsedMessages) || !Array.isArray(committedMessages)) return false;
|
|
29837
29842
|
if (parsedMessages.length > committedMessages.length) return true;
|
|
@@ -31152,7 +31157,7 @@ var require_dist2 = __commonJS({
|
|
|
31152
31157
|
};
|
|
31153
31158
|
}
|
|
31154
31159
|
const hasVisibleAssistantMessage = Array.isArray(result?.messages) && result.messages.some((message) => message?.role === "assistant" && typeof message?.content === "string" && message.content.trim());
|
|
31155
|
-
const shouldClampStaleGeneratingToIdle = result?.status === "generating" && this.currentStatus === "idle" && !this.currentTurnScope && !result?.activeModal && hasVisibleAssistantMessage;
|
|
31160
|
+
const shouldClampStaleGeneratingToIdle = result?.status === "generating" && this.currentStatus === "idle" && !this.currentTurnScope && !result?.activeModal && hasVisibleAssistantMessage && !hasVisibleInterruptPrompt(screenText);
|
|
31156
31161
|
if (shouldClampStaleGeneratingToIdle) {
|
|
31157
31162
|
result = {
|
|
31158
31163
|
...result,
|