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