mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 07:10:55 +00:00
feat(mcp): add reconnect command and implement auto-reconnect logic
- Added a new reconnect command to the MCP CLI. - Implemented auto-reconnect functionality in DiscoveredMCPToolInvocation to handle connection errors with retry logic. - Enhanced tests to cover reconnect scenarios and ensure reliability during connection failures.
This commit is contained in:
parent
9391779cd0
commit
8a2bda67ed
6 changed files with 874 additions and 95 deletions
|
|
@ -9,6 +9,7 @@ import type { CommandModule, Argv } from 'yargs';
|
|||
import { addCommand } from './mcp/add.js';
|
||||
import { removeCommand } from './mcp/remove.js';
|
||||
import { listCommand } from './mcp/list.js';
|
||||
import { reconnectCommand } from './mcp/reconnect.js';
|
||||
|
||||
export const mcpCommand: CommandModule = {
|
||||
command: 'mcp',
|
||||
|
|
@ -18,6 +19,7 @@ export const mcpCommand: CommandModule = {
|
|||
.command(addCommand)
|
||||
.command(removeCommand)
|
||||
.command(listCommand)
|
||||
.command(reconnectCommand)
|
||||
.demandCommand(1, 'You need at least one command before continuing.')
|
||||
.version(false),
|
||||
handler: () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue