UI: simplify Qwen labels

This commit is contained in:
Muhammed Mukhthar CM
2026-01-17 20:32:20 +00:00
committed by Peter Steinberger
parent b56b67cdbd
commit 215c395fc2
5 changed files with 16 additions and 16 deletions

View File

@@ -21,4 +21,4 @@ clawdbot models auth login --provider qwen-portal --set-default
## Notes
- Qwen OAuth uses a device-code login flow.
- Tokens expire periodically; re-run login if requests fail.
- Tokens auto-refresh; re-run login if refresh fails or access is revoked.

View File

@@ -139,7 +139,7 @@ describe("buildAuthChoiceOptions", () => {
expect(options.some((opt) => opt.value === "chutes")).toBe(true);
});
it("includes Qwen Portal auth choice", () => {
it("includes Qwen auth choice", () => {
const store: AuthProfileStore = { version: 1, profiles: {} };
const options = buildAuthChoiceOptions({
store,

View File

@@ -56,7 +56,7 @@ const AUTH_CHOICE_GROUP_DEFS: {
{
value: "qwen",
label: "Qwen",
hint: "Portal OAuth",
hint: "OAuth",
choices: ["qwen-portal"],
},
{

View File

@@ -1,15 +1,15 @@
import type { ClawdbotConfig } from "../config/config.js";
import { resolveDefaultAgentId, resolveAgentDir, resolveAgentWorkspaceDir } from "../agents/agent-scope.js";
import { resolveDefaultAgentWorkspaceDir } from "../agents/workspace.js";
import { upsertAuthProfile } from "../agents/auth-profiles.js";
import { normalizeProviderId } from "../agents/model-selection.js";
import type { ApplyAuthChoiceParams, ApplyAuthChoiceResult } from "./auth-choice.apply.js";
import { applyAuthProfileConfig } from "./onboard-auth.js";
import { isRemoteEnvironment } from "./oauth-env.js";
import { openUrl } from "./onboard-helpers.js";
import { createVpsAwareOAuthHandlers } from "./oauth-flow.js";
import { resolveDefaultAgentWorkspaceDir } from "../agents/workspace.js";
import type { ClawdbotConfig } from "../config/config.js";
import { resolvePluginProviders } from "../plugins/providers.js";
import type { ProviderAuthMethod, ProviderPlugin } from "../plugins/types.js";
import type { ApplyAuthChoiceParams, ApplyAuthChoiceResult } from "./auth-choice.apply.js";
import { applyAuthProfileConfig } from "./onboard-auth.js";
import { openUrl } from "./onboard-helpers.js";
import { createVpsAwareOAuthHandlers } from "./oauth-flow.js";
import { isRemoteEnvironment } from "./oauth-env.js";
const PLUGIN_ID = "qwen-portal-auth";
const PROVIDER_ID = "qwen-portal";
@@ -116,15 +116,15 @@ export async function applyAuthChoiceQwenPortal(
const provider = resolveProviderMatch(providers, PROVIDER_ID);
if (!provider) {
await params.prompter.note(
"Qwen Portal auth plugin is not available. Run `clawdbot plugins enable qwen-portal-auth` and re-run the wizard.",
"Qwen Portal",
"Qwen auth plugin is not available. Run `clawdbot plugins enable qwen-portal-auth` and re-run the wizard.",
"Qwen",
);
return { config: nextConfig };
}
const method = pickAuthMethod(provider, "device") ?? provider.auth[0];
if (!method) {
await params.prompter.note("Qwen Portal auth method missing.", "Qwen Portal");
await params.prompter.note("Qwen auth method missing.", "Qwen");
return { config: nextConfig };
}

View File

@@ -13,7 +13,7 @@ vi.mock("../providers/github-copilot-auth.js", () => ({
githubCopilotLoginCommand: vi.fn(async () => {}),
}));
const resolvePluginProviders = vi.fn(() => []);
const resolvePluginProviders = vi.hoisted(() => vi.fn(() => []));
vi.mock("../plugins/providers.js", () => ({
resolvePluginProviders,
}));
@@ -492,7 +492,7 @@ describe("applyAuthChoice", () => {
});
});
it("writes Qwen Portal credentials when selecting qwen-portal", async () => {
it("writes Qwen credentials when selecting qwen-portal", async () => {
tempStateDir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-auth-"));
process.env.CLAWDBOT_STATE_DIR = tempStateDir;
process.env.CLAWDBOT_AGENT_DIR = path.join(tempStateDir, "agent");
@@ -501,7 +501,7 @@ describe("applyAuthChoice", () => {
resolvePluginProviders.mockReturnValue([
{
id: "qwen-portal",
label: "Qwen Portal OAuth",
label: "Qwen",
auth: [
{
id: "device",