mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +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:
@@ -20,6 +20,7 @@ const DEFAULT_GEMINI_MODEL = 'gemini-2.5-flash-preview-04-17';
|
||||
interface CliArgs {
|
||||
target_dir: string | undefined;
|
||||
model: string | undefined;
|
||||
debug_mode: boolean | undefined;
|
||||
}
|
||||
|
||||
function parseArguments(): CliArgs {
|
||||
@@ -36,6 +37,12 @@ function parseArguments(): CliArgs {
|
||||
description: `The Gemini model to use. Defaults to ${DEFAULT_GEMINI_MODEL}.`,
|
||||
default: DEFAULT_GEMINI_MODEL,
|
||||
})
|
||||
.option('debug_mode', {
|
||||
alias: 'z',
|
||||
type: 'boolean',
|
||||
description: 'Whether to run in debug mode. Defaults to false.',
|
||||
default: false,
|
||||
})
|
||||
.help()
|
||||
.alias('h', 'help')
|
||||
.strict().argv;
|
||||
@@ -64,6 +71,7 @@ export function loadCliConfig(): Config {
|
||||
process.env.GEMINI_API_KEY,
|
||||
argv.model || DEFAULT_GEMINI_MODEL,
|
||||
argv.target_dir || process.cwd(),
|
||||
argv.debug_mode || false,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user