@adhdev/daemon-core 0.9.14 → 0.9.16
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/package.json
CHANGED
|
@@ -111,6 +111,17 @@ function normalizeComparableTranscriptText(value: unknown): string {
|
|
|
111
111
|
.trim();
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
function hasVisibleInterruptPrompt(text: string): boolean {
|
|
115
|
+
const interruptCopyPattern = /\bEnter\s+to\s+interrupt\b(?:\s*,?\s*Ctrl\s*(?:\+|-)?\s*C\s+to\s+cancel)?/i;
|
|
116
|
+
return sanitizeTerminalText(text || '')
|
|
117
|
+
.split(/\r?\n/g)
|
|
118
|
+
.some((line) => {
|
|
119
|
+
const trimmed = line.trim();
|
|
120
|
+
if (!interruptCopyPattern.test(trimmed)) return false;
|
|
121
|
+
return /^(?:[^A-Za-z0-9\s]{1,8}\s+)?[❯›>]\s+/.test(trimmed);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
114
125
|
function parsedTranscriptIsRicherThanCommitted(
|
|
115
126
|
parsedMessages: Array<{ role?: string; content?: unknown; id?: string; index?: number }> | null | undefined,
|
|
116
127
|
committedMessages: Array<{ role?: string; content?: unknown; id?: string; index?: number }> | null | undefined,
|
|
@@ -1660,7 +1671,8 @@ export class ProviderCliAdapter implements CliAdapter {
|
|
|
1660
1671
|
&& this.currentStatus === 'idle'
|
|
1661
1672
|
&& !this.currentTurnScope
|
|
1662
1673
|
&& !result?.activeModal
|
|
1663
|
-
&& hasVisibleAssistantMessage
|
|
1674
|
+
&& hasVisibleAssistantMessage
|
|
1675
|
+
&& !hasVisibleInterruptPrompt(screenText);
|
|
1664
1676
|
if (shouldClampStaleGeneratingToIdle) {
|
|
1665
1677
|
result = {
|
|
1666
1678
|
...result,
|