diff options
| author | Harold Mciver <[email protected]> | 2025-08-13 19:31:24 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-13 19:31:24 +0000 |
| commit | 8fae227e8d53b962f8b7db3abff51906fad1d181 (patch) | |
| tree | 1bf42ec8896ca5d1b6a310a89d36e52028ccd393 /packages/cli/src/ui/commands/mcpCommand.ts | |
| parent | c0c0e9b7a0a768515181e6ae7defe9f06199ea18 (diff) | |
fix: Prevent duplicate or inactive tools/prompts after server refresh (#5850)
Diffstat (limited to 'packages/cli/src/ui/commands/mcpCommand.ts')
| -rw-r--r-- | packages/cli/src/ui/commands/mcpCommand.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/cli/src/ui/commands/mcpCommand.ts b/packages/cli/src/ui/commands/mcpCommand.ts index 11c71f1a..686102be 100644 --- a/packages/cli/src/ui/commands/mcpCommand.ts +++ b/packages/cli/src/ui/commands/mcpCommand.ts @@ -417,6 +417,9 @@ const authCommand: SlashCommand = { await geminiClient.setTools(); } + // Reload the slash commands to reflect the changes. + context.ui.reloadCommands(); + return { type: 'message', messageType: 'info', @@ -507,6 +510,9 @@ const refreshCommand: SlashCommand = { await geminiClient.setTools(); } + // Reload the slash commands to reflect the changes. + context.ui.reloadCommands(); + return getMcpStatus(context, false, false, false); }, }; |
