@adhdev/daemon-standalone 0.8.89 → 0.8.90
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
|
@@ -29514,8 +29514,8 @@ var require_dist2 = __commonJS({
|
|
|
29514
29514
|
scope,
|
|
29515
29515
|
runtimeSettings
|
|
29516
29516
|
} = options;
|
|
29517
|
-
const buffer = scope ? sliceFromOffset(accumulatedBuffer, scope.bufferStart)
|
|
29518
|
-
const rawBuffer = scope ? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart)
|
|
29517
|
+
const buffer = scope ? sliceFromOffset(accumulatedBuffer, scope.bufferStart) : accumulatedBuffer;
|
|
29518
|
+
const rawBuffer = scope ? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart) : accumulatedRawBuffer;
|
|
29519
29519
|
const screenText = terminalScreenText;
|
|
29520
29520
|
const recentBuffer = buffer.slice(-1e3) || recentOutputBuffer;
|
|
29521
29521
|
return {
|
|
@@ -29547,8 +29547,8 @@ var require_dist2 = __commonJS({
|
|
|
29547
29547
|
}
|
|
29548
29548
|
function buildCliTraceParseSnapshot(options) {
|
|
29549
29549
|
const { accumulatedBuffer, accumulatedRawBuffer, responseBuffer, partialResponse, scope } = options;
|
|
29550
|
-
const scopedBuffer = scope ? sliceFromOffset(accumulatedBuffer, scope.bufferStart)
|
|
29551
|
-
const scopedRawBuffer = scope ? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart)
|
|
29550
|
+
const scopedBuffer = scope ? sliceFromOffset(accumulatedBuffer, scope.bufferStart) : accumulatedBuffer;
|
|
29551
|
+
const scopedRawBuffer = scope ? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart) : accumulatedRawBuffer;
|
|
29552
29552
|
return {
|
|
29553
29553
|
currentTurnScope: scope || null,
|
|
29554
29554
|
responseBuffer: summarizeCliTraceText(responseBuffer, 1200),
|
|
@@ -30208,6 +30208,7 @@ var require_dist2 = __commonJS({
|
|
|
30208
30208
|
looksLikeClaudeGeneratingLine(line) {
|
|
30209
30209
|
const trimmed = String(line || "").trim();
|
|
30210
30210
|
if (!trimmed) return false;
|
|
30211
|
+
if (/^⏵⏵\s+accept edits on/i.test(trimmed)) return false;
|
|
30211
30212
|
if (/esc to (cancel|interrupt|stop)/i.test(trimmed)) return true;
|
|
30212
30213
|
if (/^[✻✶✳✢✽⠂⠐⠒⠓⠦⠴⠶⠷⠿]+\s+\S+.*\b(?:thinking|thought for \d+s?)\b/i.test(trimmed)) return true;
|
|
30213
30214
|
if (/^[✻✶✳✢✽⠂⠐⠒⠓⠦⠴⠶⠷⠿]+\s+[A-Z][A-Za-z-]{3,}ing\b.*(?:…|\.{3})/u.test(trimmed)) return true;
|
|
@@ -30520,7 +30521,7 @@ var require_dist2 = __commonJS({
|
|
|
30520
30521
|
`[${this.cliType}] settled diagnostics prompt=${JSON.stringify(this.currentTurnScope.prompt).slice(0, 140)} scriptStatus=${String(scriptStatus || "")} parsedStatus=${String(parsedTranscript?.status || "")} parsedMsgCount=${parsedMessages.length} lastParsedAssistant=${JSON.stringify(summarizeCliTraceText(lastParsedAssistant?.content || "", 120)).slice(0, 160)} visibleIdlePrompt=${String(visibleIdlePrompt)} visibleAssistantCandidate=${String(visibleAssistantCandidate)} responseBuffer=${JSON.stringify(summarizeCliTraceText(this.responseBuffer, 160)).slice(0, 220)} screen=${JSON.stringify(summarizeCliTraceText(screenText, 160)).slice(0, 220)}`
|
|
30521
30522
|
);
|
|
30522
30523
|
}
|
|
30523
|
-
const shouldHoldGenerating = scriptStatus === "idle" && this.isWaitingForResponse && !modal && recentInteractiveActivity && !(visibleIdlePrompt && visibleAssistantCandidate);
|
|
30524
|
+
const shouldHoldGenerating = scriptStatus === "idle" && this.isWaitingForResponse && !modal && recentInteractiveActivity && !(visibleIdlePrompt && visibleAssistantCandidate) && !(parsedTranscript?.status === "idle" && !!lastParsedAssistant);
|
|
30524
30525
|
if (shouldHoldGenerating) {
|
|
30525
30526
|
this.clearIdleFinishCandidate("hold_generating_recent_activity");
|
|
30526
30527
|
this.setStatus("generating", "recent_activity_hold");
|
|
@@ -30922,11 +30923,17 @@ var require_dist2 = __commonJS({
|
|
|
30922
30923
|
return null;
|
|
30923
30924
|
}
|
|
30924
30925
|
}
|
|
30926
|
+
projectEffectiveStatus(startupModal = null) {
|
|
30927
|
+
if (this.parseErrorMessage) return "error";
|
|
30928
|
+
if (startupModal) return "waiting_approval";
|
|
30929
|
+
if (this.isWaitingForResponse && this.currentTurnScope && this.currentStatus === "idle") return "generating";
|
|
30930
|
+
return this.currentStatus;
|
|
30931
|
+
}
|
|
30925
30932
|
// ─── Public API (CliAdapter) ───────────────────
|
|
30926
30933
|
getStatus() {
|
|
30927
30934
|
const screenText = this.terminalScreen.getText() || "";
|
|
30928
30935
|
const startupModal = this.startupParseGate ? this.getStartupConfirmationModal(screenText) : null;
|
|
30929
|
-
const effectiveStatus = this.
|
|
30936
|
+
const effectiveStatus = this.projectEffectiveStatus(startupModal);
|
|
30930
30937
|
return {
|
|
30931
30938
|
status: effectiveStatus,
|
|
30932
30939
|
messages: [...this.committedMessages],
|
|
@@ -31633,7 +31640,7 @@ ${data.message || ""}`.trim();
|
|
|
31633
31640
|
}
|
|
31634
31641
|
this.setStatus("generating", "approval_resolved");
|
|
31635
31642
|
this.onStatusChange?.();
|
|
31636
|
-
const startupTrustModal = /Quick safety check|project trust|trust (?:this project|the contents of this directory|the files in this folder)/i.test(String(modal?.message || ""));
|
|
31643
|
+
const startupTrustModal = /Quick safety check|project trust|Confirm Claude Code project trust|trust (?:this project|the contents of this directory|the files in this folder)/i.test(String(modal?.message || ""));
|
|
31637
31644
|
if (startupTrustModal && buttonIndex in this.approvalKeys) {
|
|
31638
31645
|
this.ptyProcess.write(`${this.approvalKeys[buttonIndex]}\r`);
|
|
31639
31646
|
} else if (this.shouldResolveModalWithEnter(modal, buttonIndex)) {
|
|
@@ -31659,7 +31666,7 @@ ${data.message || ""}`.trim();
|
|
|
31659
31666
|
getDebugState() {
|
|
31660
31667
|
const screenText = sanitizeTerminalText(this.terminalScreen.getText());
|
|
31661
31668
|
const startupModal = this.startupParseGate ? this.getStartupConfirmationModal(screenText) : null;
|
|
31662
|
-
const effectiveStatus =
|
|
31669
|
+
const effectiveStatus = this.projectEffectiveStatus(startupModal);
|
|
31663
31670
|
const effectiveReady = this.ready || !!startupModal;
|
|
31664
31671
|
return {
|
|
31665
31672
|
type: this.cliType,
|