mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Remove extra args from config (#27)
We don't have a use case for them yet.
This commit is contained in:
@@ -11,13 +11,11 @@ export class Config {
|
|||||||
private apiKey: string;
|
private apiKey: string;
|
||||||
private model: string;
|
private model: string;
|
||||||
private targetDir: string;
|
private targetDir: string;
|
||||||
private extraArgs: (string | number)[]; // Captures positional arguments
|
|
||||||
|
|
||||||
constructor(apiKey: string, model: string, targetDir: string, extraArgs: (string | number)[]) {
|
constructor(apiKey: string, model: string, targetDir: string) {
|
||||||
this.apiKey = apiKey;
|
this.apiKey = apiKey;
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.targetDir = targetDir;
|
this.targetDir = targetDir;
|
||||||
this.extraArgs = extraArgs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getApiKey(): string {
|
getApiKey(): string {
|
||||||
@@ -31,10 +29,6 @@ export class Config {
|
|||||||
getTargetDir(): string {
|
getTargetDir(): string {
|
||||||
return this.targetDir;
|
return this.targetDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
getExtraArgs(): (string | number)[] {
|
|
||||||
return this.extraArgs;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function loadConfig(): Config {
|
export function loadConfig(): Config {
|
||||||
@@ -44,7 +38,6 @@ export function loadConfig(): Config {
|
|||||||
process.env.GEMINI_API_KEY || "",
|
process.env.GEMINI_API_KEY || "",
|
||||||
argv.model || process.env.GEMINI_API_KEY || DEFAULT_GEMINI_MODEL,
|
argv.model || process.env.GEMINI_API_KEY || DEFAULT_GEMINI_MODEL,
|
||||||
argv.target_dir || process.cwd(),
|
argv.target_dir || process.cwd(),
|
||||||
argv._,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +46,6 @@ export const globalConfig = loadConfig(); // TODO(jbd): Remove global state.
|
|||||||
interface CliArgs {
|
interface CliArgs {
|
||||||
target_dir: string | undefined;
|
target_dir: string | undefined;
|
||||||
model: string | undefined;
|
model: string | undefined;
|
||||||
_: (string | number)[]; // Captures positional arguments
|
|
||||||
// Add other expected args here if needed
|
// Add other expected args here if needed
|
||||||
// e.g., verbose?: boolean;
|
// e.g., verbose?: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user