From 0e39283631709caf9cbea8651d5c5189d80f14c8 Mon Sep 17 00:00:00 2001 From: claude-code-best Date: Thu, 28 May 2026 21:12:02 +0800 Subject: [PATCH] fix: resolve pre-existing typecheck errors (zod v4 compat + RCS web exclude) --- src/cli/print.ts | 4 ++-- src/entrypoints/cli.tsx | 2 +- src/hooks/useIdeAtMentioned.ts | 2 +- src/hooks/useIdeLogging.ts | 2 +- src/hooks/useIdeSelection.ts | 2 +- src/hooks/usePromptsFromClaudeInChrome.tsx | 2 +- src/services/mcp/useManageMCPConnections.ts | 4 ++-- src/services/mcp/vscodeSdkMcp.ts | 2 +- tsconfig.json | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/cli/print.ts b/src/cli/print.ts index 9873c7a21..7845701e9 100644 --- a/src/cli/print.ts +++ b/src/cli/print.ts @@ -4966,7 +4966,7 @@ function handleChannelEnable( // channel messages queue at priority 'next' and are seen by the model on // the turn after they arrive. connection.client.setNotificationHandler( - ChannelMessageNotificationSchema(), + ChannelMessageNotificationSchema() as any, async notification => { const { content, meta } = notification.params logMCPDebug( @@ -5042,7 +5042,7 @@ function reregisterChannelHandlerAfterReconnect( 'Channel notifications re-registered after reconnect', ) connection.client.setNotificationHandler( - ChannelMessageNotificationSchema(), + ChannelMessageNotificationSchema() as any, async notification => { const { content, meta } = notification.params logMCPDebug( diff --git a/src/entrypoints/cli.tsx b/src/entrypoints/cli.tsx index efe7e5272..7358e7ed2 100644 --- a/src/entrypoints/cli.tsx +++ b/src/entrypoints/cli.tsx @@ -146,7 +146,7 @@ async function main(): Promise { shutdown1PEventLogging, logForDebugging, registerPermissionHandler(server, handler) { - server.setNotificationHandler(ChannelPermissionRequestNotificationSchema(), async notification => + server.setNotificationHandler(ChannelPermissionRequestNotificationSchema() as any, async notification => handler(notification.params), ); }, diff --git a/src/hooks/useIdeAtMentioned.ts b/src/hooks/useIdeAtMentioned.ts index eb5977f91..7d79c6e5e 100644 --- a/src/hooks/useIdeAtMentioned.ts +++ b/src/hooks/useIdeAtMentioned.ts @@ -47,7 +47,7 @@ export function useIdeAtMentioned( // If we found a connected IDE client, register our handler if (ideClient) { ideClient.client.setNotificationHandler( - AtMentionedSchema(), + AtMentionedSchema() as any, notification => { if (ideClientRef.current !== ideClient) { return diff --git a/src/hooks/useIdeLogging.ts b/src/hooks/useIdeLogging.ts index e73c2301f..1fde54e0a 100644 --- a/src/hooks/useIdeLogging.ts +++ b/src/hooks/useIdeLogging.ts @@ -27,7 +27,7 @@ export function useIdeLogging(mcpClients: MCPServerConnection[]): void { if (ideClient) { // Register the log event handler ideClient.client.setNotificationHandler( - LogEventSchema(), + LogEventSchema() as any, notification => { const { eventName, eventData } = notification.params logEvent( diff --git a/src/hooks/useIdeSelection.ts b/src/hooks/useIdeSelection.ts index 9fb2f464f..1c678518a 100644 --- a/src/hooks/useIdeSelection.ts +++ b/src/hooks/useIdeSelection.ts @@ -110,7 +110,7 @@ export function useIdeSelection( // Register notification handler for selection_changed events ideClient.client.setNotificationHandler( - SelectionChangedSchema(), + SelectionChangedSchema() as any, notification => { if (currentIDERef.current !== ideClient) { return diff --git a/src/hooks/usePromptsFromClaudeInChrome.tsx b/src/hooks/usePromptsFromClaudeInChrome.tsx index 7334b0d4c..94eee798a 100644 --- a/src/hooks/usePromptsFromClaudeInChrome.tsx +++ b/src/hooks/usePromptsFromClaudeInChrome.tsx @@ -48,7 +48,7 @@ export function usePromptsFromClaudeInChrome( } if (mcpClient) { - mcpClient.client.setNotificationHandler(ClaudeInChromePromptNotificationSchema(), notification => { + mcpClient.client.setNotificationHandler(ClaudeInChromePromptNotificationSchema() as any, notification => { if (mcpClientRef.current !== mcpClient) { return; } diff --git a/src/services/mcp/useManageMCPConnections.ts b/src/services/mcp/useManageMCPConnections.ts index 993a4e7ee..729621457 100644 --- a/src/services/mcp/useManageMCPConnections.ts +++ b/src/services/mcp/useManageMCPConnections.ts @@ -504,7 +504,7 @@ export function useManageMCPConnections( case 'register': logMCPDebug(client.name, 'Channel notifications registered') client.client.setNotificationHandler( - ChannelMessageNotificationSchema(), + ChannelMessageNotificationSchema() as any, async notification => { const { content, meta } = notification.params logMCPDebug( @@ -539,7 +539,7 @@ export function useManageMCPConnections( client.capabilities?.experimental?.['claude/channel/permission'] ) { client.client.setNotificationHandler( - ChannelPermissionNotificationSchema(), + ChannelPermissionNotificationSchema() as any, async notification => { const { request_id, behavior } = notification.params const resolved = diff --git a/src/services/mcp/vscodeSdkMcp.ts b/src/services/mcp/vscodeSdkMcp.ts index a15329cfb..27ee1c446 100644 --- a/src/services/mcp/vscodeSdkMcp.ts +++ b/src/services/mcp/vscodeSdkMcp.ts @@ -69,7 +69,7 @@ export function setupVscodeSdkMcp(sdkClients: MCPServerConnection[]): void { vscodeMcpClient = client client.client.setNotificationHandler( - LogEventNotificationSchema(), + LogEventNotificationSchema() as any, async notification => { const { eventName, eventData } = notification.params logEvent( diff --git a/tsconfig.json b/tsconfig.json index f34dc34dc..bcc029849 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,5 +32,5 @@ "packages/**/*.ts", "packages/**/*.tsx" ], - "exclude": ["node_modules"] + "exclude": ["node_modules", "packages/remote-control-server/web"] }