Skip to content

Commit d70e6dc

Browse files
committed
In useConnection.ts,
- import LoggingMessageNotificationSchema - set onNotification as notification handler for LoggingMessageNotificationSchema
1 parent c772529 commit d70e6dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/src/lib/hooks/useConnection.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
ListRootsRequestSchema,
1111
ProgressNotificationSchema,
1212
ResourceUpdatedNotificationSchema,
13+
LoggingMessageNotificationSchema,
1314
Request,
1415
Result,
1516
ServerCapabilities,
@@ -258,6 +259,11 @@ export function useConnection({
258259
ResourceUpdatedNotificationSchema,
259260
onNotification,
260261
);
262+
263+
client.setNotificationHandler(
264+
LoggingMessageNotificationSchema,
265+
onNotification,
266+
);
261267
}
262268

263269
if (onStdErrNotification) {

0 commit comments

Comments
 (0)