mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-06 07:29:42 +02:00
fix: memory leaks and error handling improvements
- execution-bridge: track and cleanup retry timers to prevent memory leaks - model-selector: add exhaustive type check for ModelTier - ralph-tracker: fix division by zero when summary.total is 0 - respawn-controller: remove event listeners on stop to prevent memory leaks - screen-manager: use Promise.allSettled for better error handling in stats - session-manager: use Promise.allSettled for stopAllSessions resilience Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -288,6 +288,12 @@ export class ModelSelector extends EventEmitter {
|
||||
case 'opus': return 5.0; // ~5x more expensive
|
||||
case 'sonnet': return 1.0; // baseline
|
||||
case 'haiku': return 0.04; // ~25x cheaper
|
||||
default: {
|
||||
// Exhaustive check - if new ModelTier added, this will catch it
|
||||
const _exhaustive: never = model;
|
||||
console.warn(`[ModelSelector] Unknown model tier: ${_exhaustive}, using sonnet multiplier`);
|
||||
return 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user