mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-04 14:39:42 +02:00
fix: persist respawnEnabled state to state.json
The respawn controller's enabled/disabled state was not being saved, so CLI status couldn't show whether respawn was active. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -74,6 +74,8 @@ export interface SessionState {
|
||||
inputTokens?: number;
|
||||
/** Output tokens used */
|
||||
outputTokens?: number;
|
||||
/** Whether respawn controller is currently enabled/running */
|
||||
respawnEnabled?: boolean;
|
||||
/** Respawn controller config (if enabled) */
|
||||
respawnConfig?: RespawnConfig & { durationMinutes?: number };
|
||||
/** Ralph / Todo tracker enabled */
|
||||
|
||||
@@ -1289,6 +1289,9 @@ export class WebServer extends EventEmitter {
|
||||
? Math.round((timerInfo.endAt - timerInfo.startedAt) / 60000)
|
||||
: undefined;
|
||||
state.respawnConfig = { ...config, durationMinutes };
|
||||
state.respawnEnabled = controller.state !== 'stopped';
|
||||
} else {
|
||||
state.respawnEnabled = false;
|
||||
}
|
||||
this.store.setSession(session.id, state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user