Merge branch 'main' into chore/sync-gemini-cli-v0.1.21

This commit is contained in:
tanzhenxin
2025-08-22 10:20:01 +08:00
22 changed files with 984 additions and 701 deletions

View File

@@ -203,7 +203,6 @@ export interface ConfigParameters {
folderTrust?: boolean;
ideMode?: boolean;
enableOpenAILogging?: boolean;
sampling_params?: Record<string, unknown>;
systemPromptMappings?: Array<{
baseUrls: string[];
modelNames: string[];
@@ -212,6 +211,9 @@ export interface ConfigParameters {
contentGenerator?: {
timeout?: number;
maxRetries?: number;
samplingParams?: {
[key: string]: unknown;
};
};
cliVersion?: string;
loadMemoryFromIncludeDirectories?: boolean;
@@ -287,10 +289,10 @@ export class Config {
| Record<string, SummarizeToolOutputSettings>
| undefined;
private readonly enableOpenAILogging: boolean;
private readonly sampling_params?: Record<string, unknown>;
private readonly contentGenerator?: {
timeout?: number;
maxRetries?: number;
samplingParams?: Record<string, unknown>;
};
private readonly cliVersion?: string;
private readonly experimentalZedIntegration: boolean = false;
@@ -367,7 +369,6 @@ export class Config {
this.ideClient = IdeClient.getInstance();
this.systemPromptMappings = params.systemPromptMappings;
this.enableOpenAILogging = params.enableOpenAILogging ?? false;
this.sampling_params = params.sampling_params;
this.contentGenerator = params.contentGenerator;
this.cliVersion = params.cliVersion;
@@ -766,10 +767,6 @@ export class Config {
return this.enableOpenAILogging;
}
getSamplingParams(): Record<string, unknown> | undefined {
return this.sampling_params;
}
getContentGeneratorTimeout(): number | undefined {
return this.contentGenerator?.timeout;
}
@@ -778,6 +775,12 @@ export class Config {
return this.contentGenerator?.maxRetries;
}
getContentGeneratorSamplingParams(): ContentGeneratorConfig['samplingParams'] {
return this.contentGenerator?.samplingParams as
| ContentGeneratorConfig['samplingParams']
| undefined;
}
getCliVersion(): string | undefined {
return this.cliVersion;
}