mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 04:30:48 +00:00
merge main de resolve conflict
This commit is contained in:
commit
3458c1d68b
191 changed files with 9340 additions and 7371 deletions
|
|
@ -464,7 +464,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;
|
||||
|
|
@ -640,7 +640,7 @@ export class Config {
|
|||
this.webSearch = params.webSearch;
|
||||
this.useRipgrep = params.useRipgrep ?? true;
|
||||
this.useBuiltinRipgrep = params.useBuiltinRipgrep ?? true;
|
||||
this.shouldUseNodePtyShell = params.shouldUseNodePtyShell ?? false;
|
||||
this.shouldUseNodePtyShell = params.shouldUseNodePtyShell ?? true;
|
||||
this.skipNextSpeakerCheck = params.skipNextSpeakerCheck ?? true;
|
||||
this.shellExecutionConfig = {
|
||||
terminalWidth: params.shellExecutionConfig?.terminalWidth ?? 80,
|
||||
|
|
@ -1324,17 +1324,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