@adhdev/daemon-core 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/cli-adapters/provider-cli-adapter.d.ts +1 -0
- package/dist/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -8
- package/dist/index.mjs.map +1 -1
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +13 -6
- package/src/cli-adapters/provider-cli-parse.ts +4 -4
package/package.json
CHANGED
|
@@ -677,6 +677,7 @@ export class ProviderCliAdapter implements CliAdapter {
|
|
|
677
677
|
private looksLikeClaudeGeneratingLine(line: string): boolean {
|
|
678
678
|
const trimmed = String(line || '').trim();
|
|
679
679
|
if (!trimmed) return false;
|
|
680
|
+
if (/^⏵⏵\s+accept edits on/i.test(trimmed)) return false;
|
|
680
681
|
if (/esc to (cancel|interrupt|stop)/i.test(trimmed)) return true;
|
|
681
682
|
if (/^[✻✶✳✢✽⠂⠐⠒⠓⠦⠴⠶⠷⠿]+\s+\S+.*\b(?:thinking|thought for \d+s?)\b/i.test(trimmed)) return true;
|
|
682
683
|
if (/^[✻✶✳✢✽⠂⠐⠒⠓⠦⠴⠶⠷⠿]+\s+[A-Z][A-Za-z-]{3,}ing\b.*(?:…|\.{3})/u.test(trimmed)) return true;
|
|
@@ -1049,7 +1050,8 @@ export class ProviderCliAdapter implements CliAdapter {
|
|
|
1049
1050
|
&& this.isWaitingForResponse
|
|
1050
1051
|
&& !modal
|
|
1051
1052
|
&& recentInteractiveActivity
|
|
1052
|
-
&& !(visibleIdlePrompt && visibleAssistantCandidate)
|
|
1053
|
+
&& !(visibleIdlePrompt && visibleAssistantCandidate)
|
|
1054
|
+
&& !(parsedTranscript?.status === 'idle' && !!lastParsedAssistant);
|
|
1053
1055
|
|
|
1054
1056
|
if (shouldHoldGenerating) {
|
|
1055
1057
|
this.clearIdleFinishCandidate('hold_generating_recent_activity');
|
|
@@ -1461,14 +1463,19 @@ export class ProviderCliAdapter implements CliAdapter {
|
|
|
1461
1463
|
}
|
|
1462
1464
|
}
|
|
1463
1465
|
|
|
1466
|
+
private projectEffectiveStatus(startupModal: { message: string; buttons: string[] } | null = null): CliSessionStatus['status'] {
|
|
1467
|
+
if (this.parseErrorMessage) return 'error';
|
|
1468
|
+
if (startupModal) return 'waiting_approval';
|
|
1469
|
+
if (this.isWaitingForResponse && this.currentTurnScope && this.currentStatus === 'idle') return 'generating';
|
|
1470
|
+
return this.currentStatus;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1464
1473
|
// ─── Public API (CliAdapter) ───────────────────
|
|
1465
1474
|
|
|
1466
1475
|
getStatus(): CliSessionStatus {
|
|
1467
1476
|
const screenText = this.terminalScreen.getText() || '';
|
|
1468
1477
|
const startupModal = this.startupParseGate ? this.getStartupConfirmationModal(screenText) : null;
|
|
1469
|
-
const effectiveStatus = this.
|
|
1470
|
-
? 'error'
|
|
1471
|
-
: (startupModal ? 'waiting_approval' : this.currentStatus);
|
|
1478
|
+
const effectiveStatus = this.projectEffectiveStatus(startupModal);
|
|
1472
1479
|
return {
|
|
1473
1480
|
status: effectiveStatus,
|
|
1474
1481
|
messages: [...this.committedMessages],
|
|
@@ -2201,7 +2208,7 @@ export class ProviderCliAdapter implements CliAdapter {
|
|
|
2201
2208
|
}
|
|
2202
2209
|
this.setStatus('generating', 'approval_resolved');
|
|
2203
2210
|
this.onStatusChange?.();
|
|
2204
|
-
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 || ''));
|
|
2211
|
+
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 || ''));
|
|
2205
2212
|
if (startupTrustModal && buttonIndex in this.approvalKeys) {
|
|
2206
2213
|
this.ptyProcess.write(`${this.approvalKeys[buttonIndex]}\r`);
|
|
2207
2214
|
} else if (this.shouldResolveModalWithEnter(modal, buttonIndex)) {
|
|
@@ -2228,7 +2235,7 @@ export class ProviderCliAdapter implements CliAdapter {
|
|
|
2228
2235
|
getDebugState(): Record<string, any> {
|
|
2229
2236
|
const screenText = sanitizeTerminalText(this.terminalScreen.getText());
|
|
2230
2237
|
const startupModal = this.startupParseGate ? this.getStartupConfirmationModal(screenText) : null;
|
|
2231
|
-
const effectiveStatus =
|
|
2238
|
+
const effectiveStatus = this.projectEffectiveStatus(startupModal);
|
|
2232
2239
|
const effectiveReady = this.ready || !!startupModal;
|
|
2233
2240
|
return {
|
|
2234
2241
|
type: this.cliType,
|
|
@@ -139,10 +139,10 @@ export function buildCliParseInput(options: {
|
|
|
139
139
|
runtimeSettings,
|
|
140
140
|
} = options;
|
|
141
141
|
const buffer = scope
|
|
142
|
-
?
|
|
142
|
+
? sliceFromOffset(accumulatedBuffer, scope.bufferStart)
|
|
143
143
|
: accumulatedBuffer;
|
|
144
144
|
const rawBuffer = scope
|
|
145
|
-
?
|
|
145
|
+
? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart)
|
|
146
146
|
: accumulatedRawBuffer;
|
|
147
147
|
const screenText = terminalScreenText;
|
|
148
148
|
const recentBuffer = buffer.slice(-1000) || recentOutputBuffer;
|
|
@@ -189,10 +189,10 @@ export function buildCliTraceParseSnapshot(options: {
|
|
|
189
189
|
}): Record<string, any> {
|
|
190
190
|
const { accumulatedBuffer, accumulatedRawBuffer, responseBuffer, partialResponse, scope } = options;
|
|
191
191
|
const scopedBuffer = scope
|
|
192
|
-
?
|
|
192
|
+
? sliceFromOffset(accumulatedBuffer, scope.bufferStart)
|
|
193
193
|
: accumulatedBuffer;
|
|
194
194
|
const scopedRawBuffer = scope
|
|
195
|
-
?
|
|
195
|
+
? sliceFromOffset(accumulatedRawBuffer, scope.rawBufferStart)
|
|
196
196
|
: accumulatedRawBuffer;
|
|
197
197
|
return {
|
|
198
198
|
currentTurnScope: scope || null,
|