@adhdev/daemon-core 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.mjs CHANGED
@@ -1964,6 +1964,11 @@ import * as os10 from "os";
1964
1964
  function normalizeComparableTranscriptText(value) {
1965
1965
  return sanitizeTerminalText(String(value || "")).replace(/\s+/g, " ").trim();
1966
1966
  }
1967
+ function hasVisibleInterruptPrompt(text) {
1968
+ return /\bEnter\s+to\s+interrupt\b(?:\s*,?\s*Ctrl\s*(?:\+|-)?\s*C\s+to\s+cancel)?/i.test(
1969
+ sanitizeTerminalText(text || "")
1970
+ );
1971
+ }
1967
1972
  function parsedTranscriptIsRicherThanCommitted(parsedMessages, committedMessages) {
1968
1973
  if (!Array.isArray(parsedMessages) || !Array.isArray(committedMessages)) return false;
1969
1974
  if (parsedMessages.length > committedMessages.length) return true;
@@ -3282,7 +3287,7 @@ var init_provider_cli_adapter = __esm({
3282
3287
  };
3283
3288
  }
3284
3289
  const hasVisibleAssistantMessage = Array.isArray(result?.messages) && result.messages.some((message) => message?.role === "assistant" && typeof message?.content === "string" && message.content.trim());
3285
- const shouldClampStaleGeneratingToIdle = result?.status === "generating" && this.currentStatus === "idle" && !this.currentTurnScope && !result?.activeModal && hasVisibleAssistantMessage;
3290
+ const shouldClampStaleGeneratingToIdle = result?.status === "generating" && this.currentStatus === "idle" && !this.currentTurnScope && !result?.activeModal && hasVisibleAssistantMessage && !hasVisibleInterruptPrompt(screenText);
3286
3291
  if (shouldClampStaleGeneratingToIdle) {
3287
3292
  result = {
3288
3293
  ...result,