mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 04:30:48 +00:00
feat: restart MCP servers on /mcp refresh (#5479)
Co-authored-by: Brian Ray <62354532+emeryray2002@users.noreply.github.com> Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
parent
4828e4daf1
commit
b24c5887c4
9 changed files with 447 additions and 467 deletions
|
|
@ -972,6 +972,7 @@ describe('mcpCommand', () => {
|
|||
it('should refresh the list of tools and display the status', async () => {
|
||||
const mockToolRegistry = {
|
||||
discoverMcpTools: vi.fn(),
|
||||
restartMcpServers: vi.fn(),
|
||||
getAllTools: vi.fn().mockReturnValue([]),
|
||||
};
|
||||
const mockGeminiClient = {
|
||||
|
|
@ -1004,11 +1005,11 @@ describe('mcpCommand', () => {
|
|||
expect(context.ui.addItem).toHaveBeenCalledWith(
|
||||
{
|
||||
type: 'info',
|
||||
text: 'Refreshing MCP servers and tools...',
|
||||
text: 'Restarting MCP servers...',
|
||||
},
|
||||
expect.any(Number),
|
||||
);
|
||||
expect(mockToolRegistry.discoverMcpTools).toHaveBeenCalled();
|
||||
expect(mockToolRegistry.restartMcpServers).toHaveBeenCalled();
|
||||
expect(mockGeminiClient.setTools).toHaveBeenCalled();
|
||||
expect(context.ui.reloadCommands).toHaveBeenCalledTimes(1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue