Skip to content

Commit f847476

Browse files
committed
refactor(auth): 修改 --console 标志以简化登录命令
1 parent 9a5797d commit f847476

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

packages/cli/src/commands/auth/login.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default defineCommand({
2828
description: "DashScope API base URL (used with --api-key for validation)",
2929
},
3030
{
31-
flag: "--console <site>",
31+
flag: "--console",
3232
description:
3333
"Sign in via browser; use --console-site to choose domestic (default) or international",
3434
},
@@ -43,7 +43,7 @@ export default defineCommand({
4343
return;
4444
}
4545
const hasApiKey = !!(config.apiKey || config.fileApiKey);
46-
await runConsoleLogin(resolveConsoleOrigin(config.consoleSite), config, {
46+
await runConsoleLogin(resolveConsoleOrigin(config.consoleSite || "domestic"), config, {
4747
needApiKey: !hasApiKey,
4848
});
4949
return;

skills/bailian-cli/reference/auth.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Index: [index.md](index.md)
2525

2626
#### Options
2727

28-
| Flag | Type | Required | Description |
29-
| ------------------ | ------ | -------- | ------------------------------------------------------------------------------------- |
30-
| `--api-key <key>` | string | no | DashScope API key to store |
31-
| `--base-url <url>` | string | no | DashScope API base URL (used with --api-key for validation) |
32-
| `--console <site>` | string | no | Sign in via browser; use --console-site to choose domestic (default) or international |
28+
| Flag | Type | Required | Description |
29+
| ------------------ | ------- | -------- | ------------------------------------------------------------------------------------- |
30+
| `--api-key <key>` | string | no | DashScope API key to store |
31+
| `--base-url <url>` | string | no | DashScope API base URL (used with --api-key for validation) |
32+
| `--console` | boolean | no | Sign in via browser; use --console-site to choose domestic (default) or international |
3333

3434
#### Examples
3535

0 commit comments

Comments
 (0)