mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
Eliminate createServerConfig() (#821)
This commit is contained in:
parent
10b52ac4e8
commit
d6cf4d5b0b
4 changed files with 5 additions and 87 deletions
|
|
@ -34,7 +34,7 @@ vi.mock('@gemini-code/core', async () => {
|
|||
return {
|
||||
...actualServer,
|
||||
loadEnvironment: vi.fn(),
|
||||
createServerConfig: vi.fn((params) => ({
|
||||
Config: vi.fn((params) => ({
|
||||
// Mock the config object and its methods
|
||||
getApiKey: () => params.apiKey,
|
||||
getModel: () => params.model,
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@ import process from 'node:process';
|
|||
import {
|
||||
Config,
|
||||
loadEnvironment,
|
||||
createServerConfig,
|
||||
loadServerHierarchicalMemory,
|
||||
ConfigParameters,
|
||||
setGeminiMdFilename as setServerGeminiMdFilename,
|
||||
getCurrentGeminiMdFilename,
|
||||
ApprovalMode,
|
||||
|
|
@ -175,7 +173,7 @@ export async function loadCliConfig(
|
|||
modelToUse = await getEffectiveModel(apiKeyForServer, modelToUse);
|
||||
}
|
||||
|
||||
const configParams: ConfigParameters = {
|
||||
return new Config({
|
||||
apiKey: apiKeyForServer,
|
||||
model: modelToUse,
|
||||
embeddingModel: DEFAULT_GEMINI_EMBEDDING_MODEL,
|
||||
|
|
@ -206,7 +204,5 @@ export async function loadCliConfig(
|
|||
fileFilteringRespectGitIgnore: settings.fileFiltering?.respectGitIgnore,
|
||||
fileFilteringAllowBuildArtifacts:
|
||||
settings.fileFiltering?.allowBuildArtifacts,
|
||||
};
|
||||
|
||||
return createServerConfig(configParams);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue