fix: resolve pre-existing typecheck errors (zod v4 compat + RCS web exclude)

This commit is contained in:
claude-code-best
2026-05-28 21:12:02 +08:00
parent 124e3219d1
commit 0e39283631
9 changed files with 11 additions and 11 deletions

View File

@@ -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(

View File

@@ -146,7 +146,7 @@ async function main(): Promise<void> {
shutdown1PEventLogging,
logForDebugging,
registerPermissionHandler(server, handler) {
server.setNotificationHandler(ChannelPermissionRequestNotificationSchema(), async notification =>
server.setNotificationHandler(ChannelPermissionRequestNotificationSchema() as any, async notification =>
handler(notification.params),
);
},

View File

@@ -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

View File

@@ -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(

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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 =

View File

@@ -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(

View File

@@ -32,5 +32,5 @@
"packages/**/*.ts",
"packages/**/*.tsx"
],
"exclude": ["node_modules"]
"exclude": ["node_modules", "packages/remote-control-server/web"]
}