356
*/
357
private handleServerNotification(request: MCP.JSONRPCNotification & MCP.ServerNotification): void {
359
>
switch (request.method) {
360
>
case 'notifications/message':
361
return this.handleLoggingNotification(request);
363
this._onDidReceiveCancelledNotification.fire(request);
364
return this.handleCancelledNotification(request);
366
this._onDidReceiveProgressNotification.fire(request);
367
return;
369
this._onDidChangeResourceList.fire();
370
return;
372
this._onDidUpdateResource.fire(request);
373
return;
375
this._onDidChangeToolList.fire();
376
return;
378
this._onDidChangePromptList.fire();
379
return;
381
this._onDidReceiveElicitationCompleteNotification.fire(request);
382
return;
384
this._taskManager.getClientTask(request.params.taskId)?.onDidUpdateState(request.params);
385
return;
387
softAssertNever(request);
389
>
} catch (error) {
390
this.logger.error(`Error handling notification ${request.method}:`, error);
391
}
393
394
private handleCancelledNotification(request: MCP.CancelledNotification): void {