File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -778,6 +778,7 @@ export class McpEventHandler {
778778
779779 try {
780780 await McpManager . instance . updateServerPermission ( serverName , perm )
781+ this . #emitMCPConfigEvent( )
781782 } catch ( error ) {
782783 this . #features. logging . error ( `Failed to enable MCP server: ${ error } ` )
783784 }
@@ -804,6 +805,7 @@ export class McpEventHandler {
804805
805806 try {
806807 await McpManager . instance . updateServerPermission ( serverName , perm )
808+ this . #emitMCPConfigEvent( )
807809 } catch ( error ) {
808810 this . #features. logging . error ( `Failed to disable MCP server: ${ error } ` )
809811 }
@@ -996,6 +998,7 @@ export class McpEventHandler {
996998 const mcpServerPermission = await this . #processPermissionUpdates( updatedPermissionConfig )
997999
9981000 await McpManager . instance . updateServerPermission ( serverName , mcpServerPermission )
1001+ this . #emitMCPConfigEvent( )
9991002
10001003 // Get server config to emit telemetry
10011004 const serverConfig = McpManager . instance . getAllServerConfigs ( ) . get ( serverName )
Original file line number Diff line number Diff line change 55
66import type { Features } from '@aws/language-server-runtimes/server-interface/server'
77import { ChatTelemetryEventName } from '../../../../shared/telemetry/types'
8- import { ChatTelemetryController } from '../../../chat/telemetry/chatTelemetryController'
98import { getGlobalMcpConfigPath } from './mcpUtils'
109import { Client } from '@modelcontextprotocol/sdk/client/index.js'
1110import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'
@@ -64,11 +63,6 @@ export class McpManager {
6463 this . toolNameMapping = new Map < string , { serverName : string ; toolName : string } > ( )
6564 }
6665
67- /**
68- * Initialize or return existing manager, then discover all servers.
69- */
70- #telemetryController?: ChatTelemetryController
71-
7266 public static async init (
7367 configPaths : string [ ] ,
7468 personaPaths : string [ ] ,
You can’t perform that action at this time.
0 commit comments