merge main de resolve conflict

This commit is contained in:
DennisYu07 2026-03-06 16:00:51 -08:00
commit 3458c1d68b
191 changed files with 9340 additions and 7371 deletions

View file

@ -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');