Refactor error handling to use platform-specific worker restart instructions

- Updated multiple hooks (context-hook, new-hook, save-hook, summary-hook, user-message-hook) to throw errors using `getWorkerRestartInstructions` for improved user guidance on worker connection issues.
- Enhanced `handleWorkerError` function to utilize the new error message generator for consistent error reporting.
- Modified `ensureWorkerRunning` function to provide detailed instructions based on the worker's state, including port information.
- Introduced `getWorkerRestartInstructions` utility in `error-messages.ts` to generate platform-aware error messages for worker failures.
This commit is contained in:
Alex Newman
2025-12-13 17:06:45 -05:00
parent f00ef33f86
commit bb0508d639
17 changed files with 192 additions and 112 deletions
File diff suppressed because one or more lines are too long