Skip to content

fix(tips): stop recommending /login when providers already have credentials - #2678

Merged
yanyihan-xiaomi merged 2 commits into
mainfrom
fix/tips-login-credential-gate
Oct 19, 2026
Merged

yanyihan-xiaomi merged 2 commits into
mainfrom
fix/tips-login-credential-gate

Conversation

@yanyihan-xiaomi

Copy link
Copy Markdown
Collaborator

Summary

  • Home tips forced the /login tip whenever auth.json was empty, even if the user already had API keys in env or mimocode.jsonc.
  • The tip is now gated on known credential fields of computed providers (key, source === "env", or non-empty options.apiKey) — one rule that covers env, config, and auth-store API keys.
  • Bare membership in the computed provider list does not count (mimo is always listed). Keyless local-only provider blocks still recommend /login (accepted gap).

Verification

  • bun test test/cli/cmd/tui/tips-view.test.ts — 11 pass / 0 fail
  • bun run typecheck — PASS

Follow-up

  • OAuth-only logins whose plugin loaders leave no key/options.apiKey (e.g. Copilot sets apiKey: "") still show /login. Codex/xAI set OAUTH_DUMMY_KEY and suppress it. Aligning plugin auth loaders is a separate change.

…ntials

Home tips forced the /login tip whenever auth.json was empty, even if env or
mimocode.jsonc API keys were already present. Gate on known credential fields
(key, source=env, options.apiKey) across computed providers instead. Bare list
membership does not count — mimo is always listed.
@yanyihan-xiaomi
yanyihan-xiaomi force-pushed the fix/tips-login-credential-gate branch from bb6bd85 to ec4c1a6 Compare October 19, 2026 10:11
@yanyihan-xiaomi
yanyihan-xiaomi merged commit 1284a64 into main Oct 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant