refactor: normalize cli command hints
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { OAuthCredentials } from "@mariozechner/pi-ai";
|
||||
import { formatCliCommand } from "../cli/command-format.js";
|
||||
|
||||
const QWEN_OAUTH_BASE_URL = "https://chat.qwen.ai";
|
||||
const QWEN_OAUTH_TOKEN_ENDPOINT = `${QWEN_OAUTH_BASE_URL}/api/v1/oauth2/token`;
|
||||
@@ -28,7 +29,7 @@ export async function refreshQwenPortalCredentials(
|
||||
const text = await response.text();
|
||||
if (response.status === 400) {
|
||||
throw new Error(
|
||||
"Qwen OAuth refresh token expired or invalid. Re-authenticate with `clawdbot models auth login --provider qwen-portal`.",
|
||||
`Qwen OAuth refresh token expired or invalid. Re-authenticate with \`${formatCliCommand("clawdbot models auth login --provider qwen-portal")}\`.`,
|
||||
);
|
||||
}
|
||||
throw new Error(`Qwen OAuth refresh failed: ${text || response.statusText}`);
|
||||
|
||||
Reference in New Issue
Block a user