Skip to content

Commit 82d65a9

Browse files
committed
fix: skip debug log for high-frequency tool-input-partial notifications
These fire dozens of times per second during streaming and flood the console. All other JSON-RPC messages still log at debug level.
1 parent 2b0d11e commit 82d65a9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/message-transport.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,14 @@ export class PostMessageTransport implements Transport {
123123
* @param options - Optional send options (currently unused)
124124
*/
125125
async send(message: JSONRPCMessage, options?: TransportSendOptions) {
126-
console.debug("Sending message", message);
126+
// Skip debug log for high-frequency streaming notifications — these
127+
// can fire dozens of times per second and flood the console.
128+
if (
129+
(message as { method?: string }).method !==
130+
"ui/notifications/tool-input-partial"
131+
) {
132+
console.debug("Sending message", message);
133+
}
127134
this.eventTarget.postMessage(message, "*");
128135
}
129136

0 commit comments

Comments
 (0)