🔧 Miscellaneous Improvements and Refactoring (#466)

This commit is contained in:
tanzhenxin
2025-08-27 17:32:57 +08:00
committed by GitHub
parent 347e606366
commit 600c58bbcb
16 changed files with 755 additions and 81 deletions

View File

@@ -208,6 +208,7 @@ export interface ConfigParameters {
modelNames: string[];
template: string;
}>;
authType?: AuthType;
contentGenerator?: {
timeout?: number;
maxRetries?: number;
@@ -288,6 +289,7 @@ export class Config {
private readonly summarizeToolOutput:
| Record<string, SummarizeToolOutputSettings>
| undefined;
private authType?: AuthType;
private readonly enableOpenAILogging: boolean;
private readonly contentGenerator?: {
timeout?: number;
@@ -368,6 +370,7 @@ export class Config {
this.ideMode = params.ideMode ?? false;
this.ideClient = IdeClient.getInstance();
this.systemPromptMappings = params.systemPromptMappings;
this.authType = params.authType;
this.enableOpenAILogging = params.enableOpenAILogging ?? false;
this.contentGenerator = params.contentGenerator;
this.cliVersion = params.cliVersion;
@@ -451,6 +454,8 @@ export class Config {
// Reset the session flag since we're explicitly changing auth and using default model
this.inFallbackMode = false;
this.authType = authMethod;
}
getSessionId(): string {
@@ -545,6 +550,7 @@ export class Config {
getDebugMode(): boolean {
return this.debugMode;
}
getQuestion(): string | undefined {
return this.question;
}
@@ -763,6 +769,10 @@ export class Config {
}
}
getAuthType(): AuthType | undefined {
return this.authType;
}
getEnableOpenAILogging(): boolean {
return this.enableOpenAILogging;
}