refactor(vscode-ide-companion): clean up code and improve type safety

- Remove commented out error handling code in acpMessageHandler
- Simplify session update handler by removing redundant comments
- Clean up chat types interface definitions
- Simplify null check in MessageRouter
- Improve type safety in SettingsMessageHandler with ApprovalModeValue type
This commit is contained in:
yiliang114
2025-12-09 00:15:44 +08:00
parent ef3d7b92d0
commit 828b760820
5 changed files with 6 additions and 87 deletions

View File

@@ -150,13 +150,7 @@ export class MessageRouter {
*/
setLoginHandler(handler: () => Promise<void>): void {
this.authHandler.setLoginHandler(handler);
// Also set login handler for SessionMessageHandler
if (
this.sessionHandler &&
typeof this.sessionHandler.setLoginHandler === 'function'
) {
this.sessionHandler.setLoginHandler(handler);
}
this.sessionHandler?.setLoginHandler?.(handler);
}
/**