mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
fix: resolve pre-existing typecheck errors (zod v4 compat + RCS web exclude)
This commit is contained in:
@@ -4966,7 +4966,7 @@ function handleChannelEnable(
|
|||||||
// channel messages queue at priority 'next' and are seen by the model on
|
// channel messages queue at priority 'next' and are seen by the model on
|
||||||
// the turn after they arrive.
|
// the turn after they arrive.
|
||||||
connection.client.setNotificationHandler(
|
connection.client.setNotificationHandler(
|
||||||
ChannelMessageNotificationSchema(),
|
ChannelMessageNotificationSchema() as any,
|
||||||
async notification => {
|
async notification => {
|
||||||
const { content, meta } = notification.params
|
const { content, meta } = notification.params
|
||||||
logMCPDebug(
|
logMCPDebug(
|
||||||
@@ -5042,7 +5042,7 @@ function reregisterChannelHandlerAfterReconnect(
|
|||||||
'Channel notifications re-registered after reconnect',
|
'Channel notifications re-registered after reconnect',
|
||||||
)
|
)
|
||||||
connection.client.setNotificationHandler(
|
connection.client.setNotificationHandler(
|
||||||
ChannelMessageNotificationSchema(),
|
ChannelMessageNotificationSchema() as any,
|
||||||
async notification => {
|
async notification => {
|
||||||
const { content, meta } = notification.params
|
const { content, meta } = notification.params
|
||||||
logMCPDebug(
|
logMCPDebug(
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ async function main(): Promise<void> {
|
|||||||
shutdown1PEventLogging,
|
shutdown1PEventLogging,
|
||||||
logForDebugging,
|
logForDebugging,
|
||||||
registerPermissionHandler(server, handler) {
|
registerPermissionHandler(server, handler) {
|
||||||
server.setNotificationHandler(ChannelPermissionRequestNotificationSchema(), async notification =>
|
server.setNotificationHandler(ChannelPermissionRequestNotificationSchema() as any, async notification =>
|
||||||
handler(notification.params),
|
handler(notification.params),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export function useIdeAtMentioned(
|
|||||||
// If we found a connected IDE client, register our handler
|
// If we found a connected IDE client, register our handler
|
||||||
if (ideClient) {
|
if (ideClient) {
|
||||||
ideClient.client.setNotificationHandler(
|
ideClient.client.setNotificationHandler(
|
||||||
AtMentionedSchema(),
|
AtMentionedSchema() as any,
|
||||||
notification => {
|
notification => {
|
||||||
if (ideClientRef.current !== ideClient) {
|
if (ideClientRef.current !== ideClient) {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export function useIdeLogging(mcpClients: MCPServerConnection[]): void {
|
|||||||
if (ideClient) {
|
if (ideClient) {
|
||||||
// Register the log event handler
|
// Register the log event handler
|
||||||
ideClient.client.setNotificationHandler(
|
ideClient.client.setNotificationHandler(
|
||||||
LogEventSchema(),
|
LogEventSchema() as any,
|
||||||
notification => {
|
notification => {
|
||||||
const { eventName, eventData } = notification.params
|
const { eventName, eventData } = notification.params
|
||||||
logEvent(
|
logEvent(
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export function useIdeSelection(
|
|||||||
|
|
||||||
// Register notification handler for selection_changed events
|
// Register notification handler for selection_changed events
|
||||||
ideClient.client.setNotificationHandler(
|
ideClient.client.setNotificationHandler(
|
||||||
SelectionChangedSchema(),
|
SelectionChangedSchema() as any,
|
||||||
notification => {
|
notification => {
|
||||||
if (currentIDERef.current !== ideClient) {
|
if (currentIDERef.current !== ideClient) {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export function usePromptsFromClaudeInChrome(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mcpClient) {
|
if (mcpClient) {
|
||||||
mcpClient.client.setNotificationHandler(ClaudeInChromePromptNotificationSchema(), notification => {
|
mcpClient.client.setNotificationHandler(ClaudeInChromePromptNotificationSchema() as any, notification => {
|
||||||
if (mcpClientRef.current !== mcpClient) {
|
if (mcpClientRef.current !== mcpClient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -504,7 +504,7 @@ export function useManageMCPConnections(
|
|||||||
case 'register':
|
case 'register':
|
||||||
logMCPDebug(client.name, 'Channel notifications registered')
|
logMCPDebug(client.name, 'Channel notifications registered')
|
||||||
client.client.setNotificationHandler(
|
client.client.setNotificationHandler(
|
||||||
ChannelMessageNotificationSchema(),
|
ChannelMessageNotificationSchema() as any,
|
||||||
async notification => {
|
async notification => {
|
||||||
const { content, meta } = notification.params
|
const { content, meta } = notification.params
|
||||||
logMCPDebug(
|
logMCPDebug(
|
||||||
@@ -539,7 +539,7 @@ export function useManageMCPConnections(
|
|||||||
client.capabilities?.experimental?.['claude/channel/permission']
|
client.capabilities?.experimental?.['claude/channel/permission']
|
||||||
) {
|
) {
|
||||||
client.client.setNotificationHandler(
|
client.client.setNotificationHandler(
|
||||||
ChannelPermissionNotificationSchema(),
|
ChannelPermissionNotificationSchema() as any,
|
||||||
async notification => {
|
async notification => {
|
||||||
const { request_id, behavior } = notification.params
|
const { request_id, behavior } = notification.params
|
||||||
const resolved =
|
const resolved =
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export function setupVscodeSdkMcp(sdkClients: MCPServerConnection[]): void {
|
|||||||
vscodeMcpClient = client
|
vscodeMcpClient = client
|
||||||
|
|
||||||
client.client.setNotificationHandler(
|
client.client.setNotificationHandler(
|
||||||
LogEventNotificationSchema(),
|
LogEventNotificationSchema() as any,
|
||||||
async notification => {
|
async notification => {
|
||||||
const { eventName, eventData } = notification.params
|
const { eventName, eventData } = notification.params
|
||||||
logEvent(
|
logEvent(
|
||||||
|
|||||||
@@ -32,5 +32,5 @@
|
|||||||
"packages/**/*.ts",
|
"packages/**/*.ts",
|
||||||
"packages/**/*.tsx"
|
"packages/**/*.tsx"
|
||||||
],
|
],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules", "packages/remote-control-server/web"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user