mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 01:09:43 +02:00
fix: increase respawn idle timeout to 10s and use consistently
- Change default idleTimeoutMs from 5s to 10s - Use configured idle timeout for all step completion checks - Ensures each step (update, /clear, /init) waits properly until idle Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,7 @@ export interface RespawnEvents {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_CONFIG: RespawnConfig = {
|
const DEFAULT_CONFIG: RespawnConfig = {
|
||||||
idleTimeoutMs: 5000, // 5 seconds of no activity after prompt
|
idleTimeoutMs: 10000, // 10 seconds of no activity after prompt
|
||||||
updatePrompt: 'update all the docs and CLAUDE.md',
|
updatePrompt: 'update all the docs and CLAUDE.md',
|
||||||
interStepDelayMs: 1000, // 1 second between steps
|
interStepDelayMs: 1000, // 1 second between steps
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -316,7 +316,7 @@ export class RespawnController extends EventEmitter {
|
|||||||
private checkUpdateComplete(data: string): void {
|
private checkUpdateComplete(data: string): void {
|
||||||
// Update is complete when we see the prompt again after working
|
// Update is complete when we see the prompt again after working
|
||||||
if (this.promptDetected && !this.workingDetected) {
|
if (this.promptDetected && !this.workingDetected) {
|
||||||
// Wait a bit more to make sure it's truly done
|
// Wait to make sure it's truly done (use configured idle timeout)
|
||||||
this.clearIdleTimer();
|
this.clearIdleTimer();
|
||||||
this.idleTimer = setTimeout(() => {
|
this.idleTimer = setTimeout(() => {
|
||||||
if (this.promptDetected && !this.workingDetected) {
|
if (this.promptDetected && !this.workingDetected) {
|
||||||
@@ -331,7 +331,7 @@ export class RespawnController extends EventEmitter {
|
|||||||
this.completeCycle();
|
this.completeCycle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 3000); // 3 second verification
|
}, this.config.idleTimeoutMs); // Use configured idle timeout
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ export class RespawnController extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private checkClearComplete(data: string): void {
|
private checkClearComplete(data: string): void {
|
||||||
// Clear is fast, just wait for prompt
|
// Clear is fast, but wait for prompt and verify idle
|
||||||
if (this.CLEAR_COMPLETE_PATTERN.test(data) || this.promptDetected) {
|
if (this.CLEAR_COMPLETE_PATTERN.test(data) || this.promptDetected) {
|
||||||
this.clearIdleTimer();
|
this.clearIdleTimer();
|
||||||
this.idleTimer = setTimeout(() => {
|
this.idleTimer = setTimeout(() => {
|
||||||
@@ -361,7 +361,7 @@ export class RespawnController extends EventEmitter {
|
|||||||
} else {
|
} else {
|
||||||
this.completeCycle();
|
this.completeCycle();
|
||||||
}
|
}
|
||||||
}, 1000); // 1 second for clear
|
}, this.config.idleTimeoutMs); // Use configured idle timeout
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,7 +389,7 @@ export class RespawnController extends EventEmitter {
|
|||||||
this.emit('stepCompleted', 'init');
|
this.emit('stepCompleted', 'init');
|
||||||
this.completeCycle();
|
this.completeCycle();
|
||||||
}
|
}
|
||||||
}, 3000); // 3 second verification for init
|
}, this.config.idleTimeoutMs); // Use configured idle timeout
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user