mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 08:29:42 +02:00
fix: address review findings from route extraction refactor
- Add addSession() to SessionPort, replacing unsafe ReadonlyMap casts - Restore getLightSessionsState() 1s TTL cache for GET /api/sessions - Deduplicate AUTH_COOKIE_NAME, CASES_DIR, SETTINGS_PATH constants - Fix eslint no-require-imports error in system-routes.ts - Remove unused imports (homedir) from cleaned-up route modules Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -440,6 +440,9 @@ export class WebServer extends EventEmitter {
|
||||
return {
|
||||
// SessionPort
|
||||
sessions: this.sessions as ReadonlyMap<string, Session>,
|
||||
addSession: (session: Session) => {
|
||||
this.sessions.set(session.id, session);
|
||||
},
|
||||
cleanupSession: this.cleanupSession.bind(this),
|
||||
setupSessionListeners: this.setupSessionListeners.bind(this),
|
||||
persistSessionState: this.persistSessionState.bind(this),
|
||||
@@ -469,6 +472,7 @@ export class WebServer extends EventEmitter {
|
||||
getClaudeModeConfig: this.getClaudeModeConfig.bind(this),
|
||||
getDefaultClaudeMdPath: this.getDefaultClaudeMdPath.bind(this),
|
||||
getLightState: this.getLightState.bind(this),
|
||||
getLightSessionsState: this.getLightSessionsState.bind(this),
|
||||
startTranscriptWatcher: this.startTranscriptWatcher.bind(this),
|
||||
stopTranscriptWatcher: this.stopTranscriptWatcher.bind(this),
|
||||
// InfraPort
|
||||
|
||||
Reference in New Issue
Block a user