mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
Merge remote-tracking branch 'origin/main' into feat/ask-user-question-tool
This commit is contained in:
commit
2e91f0a4cd
122 changed files with 8126 additions and 6309 deletions
|
|
@ -460,7 +460,7 @@ export class Config {
|
|||
private readonly lspEnabled: boolean;
|
||||
private lspClient?: LspClient;
|
||||
private readonly allowedMcpServers?: string[];
|
||||
private readonly excludedMcpServers?: string[];
|
||||
private excludedMcpServers?: string[];
|
||||
private sessionSubagents: SubagentConfig[];
|
||||
private userMemory: string;
|
||||
private sdkMode: boolean;
|
||||
|
|
@ -1253,17 +1253,25 @@ export class Config {
|
|||
);
|
||||
}
|
||||
|
||||
if (this.excludedMcpServers) {
|
||||
mcpServers = Object.fromEntries(
|
||||
Object.entries(mcpServers).filter(
|
||||
([key]) => !this.excludedMcpServers?.includes(key),
|
||||
),
|
||||
);
|
||||
}
|
||||
// Note: We no longer filter out excluded servers here.
|
||||
// The UI layer should check isMcpServerDisabled() to determine
|
||||
// whether to show a server as disabled.
|
||||
|
||||
return mcpServers;
|
||||
}
|
||||
|
||||
getExcludedMcpServers(): string[] | undefined {
|
||||
return this.excludedMcpServers;
|
||||
}
|
||||
|
||||
setExcludedMcpServers(excluded: string[]): void {
|
||||
this.excludedMcpServers = excluded;
|
||||
}
|
||||
|
||||
isMcpServerDisabled(serverName: string): boolean {
|
||||
return this.excludedMcpServers?.includes(serverName) ?? false;
|
||||
}
|
||||
|
||||
addMcpServers(servers: Record<string, MCPServerConfig>): void {
|
||||
if (this.initialized) {
|
||||
throw new Error('Cannot modify mcpServers after initialization');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue