mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 09:19: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;
|
inputTokens?: number;
|
||||||
/** Output tokens used */
|
/** Output tokens used */
|
||||||
outputTokens?: number;
|
outputTokens?: number;
|
||||||
|
/** Whether respawn controller is currently enabled/running */
|
||||||
|
respawnEnabled?: boolean;
|
||||||
/** Respawn controller config (if enabled) */
|
/** Respawn controller config (if enabled) */
|
||||||
respawnConfig?: RespawnConfig & { durationMinutes?: number };
|
respawnConfig?: RespawnConfig & { durationMinutes?: number };
|
||||||
/** Ralph / Todo tracker enabled */
|
/** Ralph / Todo tracker enabled */
|
||||||
|
|||||||
@@ -1289,6 +1289,9 @@ export class WebServer extends EventEmitter {
|
|||||||
? Math.round((timerInfo.endAt - timerInfo.startedAt) / 60000)
|
? Math.round((timerInfo.endAt - timerInfo.startedAt) / 60000)
|
||||||
: undefined;
|
: undefined;
|
||||||
state.respawnConfig = { ...config, durationMinutes };
|
state.respawnConfig = { ...config, durationMinutes };
|
||||||
|
state.respawnEnabled = controller.state !== 'stopped';
|
||||||
|
} else {
|
||||||
|
state.respawnEnabled = false;
|
||||||
}
|
}
|
||||||
this.store.setSession(session.id, state);
|
this.store.setSession(session.id, state);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user