mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
Fix: Preserve MCP Notification Handler Binding
This change addresses the regression introduced by commit 38e8fe8d02, which broke the codex switch.
This commit is contained in:
@@ -187,10 +187,11 @@ export class CodexMcpClient {
|
||||
})
|
||||
}).passthrough();
|
||||
|
||||
const setNotificationHandler = this.client.setNotificationHandler as (
|
||||
schema: unknown,
|
||||
handler: (notification: { params: { msg: any } }) => void
|
||||
) => void;
|
||||
const setNotificationHandler =
|
||||
this.client.setNotificationHandler.bind(this.client) as (
|
||||
schema: unknown,
|
||||
handler: (notification: { params: { msg: any } }) => void
|
||||
) => void;
|
||||
|
||||
setNotificationHandler(codexNotificationSchema, (data) => {
|
||||
const msg = data.params.msg;
|
||||
|
||||
Reference in New Issue
Block a user