mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
feat(cli): add explicit proxy option in cli (#2526)
Co-authored-by: Dcatfly <dcatfly@gmail.com>
This commit is contained in:
parent
4ca471bac6
commit
606a7702de
13 changed files with 126 additions and 12 deletions
|
|
@ -57,6 +57,7 @@ export interface CliArgs {
|
|||
extensions: string[] | undefined;
|
||||
listExtensions: boolean | undefined;
|
||||
ideMode: boolean | undefined;
|
||||
proxy: string | undefined;
|
||||
}
|
||||
|
||||
export async function parseArguments(): Promise<CliArgs> {
|
||||
|
|
@ -182,7 +183,11 @@ export async function parseArguments(): Promise<CliArgs> {
|
|||
type: 'boolean',
|
||||
description: 'Run in IDE mode?',
|
||||
})
|
||||
|
||||
.option('proxy', {
|
||||
type: 'string',
|
||||
description:
|
||||
'Proxy for gemini client, like schema://user:password@host:port',
|
||||
})
|
||||
.version(await getCliVersion()) // This will enable the --version flag based on package.json
|
||||
.alias('v', 'version')
|
||||
.help()
|
||||
|
|
@ -380,6 +385,7 @@ export async function loadCliConfig(
|
|||
},
|
||||
checkpointing: argv.checkpointing || settings.checkpointing?.enabled,
|
||||
proxy:
|
||||
argv.proxy ||
|
||||
process.env.HTTPS_PROXY ||
|
||||
process.env.https_proxy ||
|
||||
process.env.HTTP_PROXY ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue