@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/dist/index.js CHANGED
@@ -1966,6 +1966,14 @@ __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
+ const interruptCopyPattern = /\bEnter\s+to\s+interrupt\b(?:\s*,?\s*Ctrl\s*(?:\+|-)?\s*C\s+to\s+cancel)?/i;
1971
+ return sanitizeTerminalText(text || "").split(/\r?\n/g).some((line) => {
1972
+ const trimmed = line.trim();
1973
+ if (!interruptCopyPattern.test(trimmed)) return false;
1974
+ return /^(?:[^A-Za-z0-9\s]{1,8}\s+)?[❯›>]\s+/.test(trimmed);
1975
+ });
1976
+ }
1969
1977
  function parsedTranscriptIsRicherThanCommitted(parsedMessages, committedMessages) {
1970
1978
  if (!Array.isArray(parsedMessages) || !Array.isArray(committedMessages)) return false;
1971
1979
  if (parsedMessages.length > committedMessages.length) return true;
@@ -3285,7 +3293,7 @@ var init_provider_cli_adapter = __esm({
3285
3293
  };
3286
3294
  }
3287
3295
  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;
3296
+ const shouldClampStaleGeneratingToIdle = result?.status === "generating" && this.currentStatus === "idle" && !this.currentTurnScope && !result?.activeModal && hasVisibleAssistantMessage && !hasVisibleInterruptPrompt(screenText);
3289
3297
  if (shouldClampStaleGeneratingToIdle) {
3290
3298
  result = {
3291
3299
  ...result,