mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Eliminate createServerConfig() (#821)
This commit is contained in:
committed by
GitHub
parent
10b52ac4e8
commit
d6cf4d5b0b
@@ -126,7 +126,7 @@ export class Config {
|
||||
this.toolCallCommand = params.toolCallCommand;
|
||||
this.mcpServerCommand = params.mcpServerCommand;
|
||||
this.mcpServers = params.mcpServers;
|
||||
this.userAgent = params.userAgent;
|
||||
this.userAgent = params.userAgent ?? 'GeminiCLI/unknown';
|
||||
this.userMemory = params.userMemory ?? '';
|
||||
this.geminiMdFileCount = params.geminiMdFileCount ?? 0;
|
||||
this.approvalMode = params.approvalMode ?? ApprovalMode.DEFAULT;
|
||||
@@ -329,14 +329,6 @@ export function loadEnvironment(): void {
|
||||
}
|
||||
}
|
||||
|
||||
export function createServerConfig(params: ConfigParameters): Config {
|
||||
return new Config({
|
||||
...params,
|
||||
targetDir: path.resolve(params.targetDir), // Ensure targetDir is resolved
|
||||
userAgent: params.userAgent ?? 'GeminiCLI/unknown', // Default user agent
|
||||
});
|
||||
}
|
||||
|
||||
export function createToolRegistry(config: Config): Promise<ToolRegistry> {
|
||||
const registry = new ToolRegistry(config);
|
||||
const targetDir = config.getTargetDir();
|
||||
|
||||
Reference in New Issue
Block a user