mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Simple debug mode for CLI side (#66)
* Adds debug mode config flag. * Wire through debug lines * Add debug mode logging example * Run format * Run format again
This commit is contained in:
@@ -13,11 +13,18 @@ export class Config {
|
||||
private apiKey: string;
|
||||
private model: string;
|
||||
private targetDir: string;
|
||||
private debugMode: boolean;
|
||||
|
||||
constructor(apiKey: string, model: string, targetDir: string) {
|
||||
constructor(
|
||||
apiKey: string,
|
||||
model: string,
|
||||
targetDir: string,
|
||||
debugMode: boolean,
|
||||
) {
|
||||
this.apiKey = apiKey;
|
||||
this.model = model;
|
||||
this.targetDir = targetDir;
|
||||
this.debugMode = debugMode;
|
||||
}
|
||||
|
||||
getApiKey(): string {
|
||||
@@ -31,6 +38,10 @@ export class Config {
|
||||
getTargetDir(): string {
|
||||
return this.targetDir;
|
||||
}
|
||||
|
||||
getDebugMode(): boolean {
|
||||
return this.debugMode;
|
||||
}
|
||||
}
|
||||
|
||||
function findEnvFile(startDir: string): string | null {
|
||||
@@ -60,6 +71,7 @@ export function createServerConfig(
|
||||
apiKey: string,
|
||||
model: string,
|
||||
targetDir: string,
|
||||
debugMode: boolean,
|
||||
): Config {
|
||||
return new Config(apiKey, model, path.resolve(targetDir));
|
||||
return new Config(apiKey, model, path.resolve(targetDir), debugMode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user