Skip to content

fix: empty token overrides provider default + hardcoded error message#19

Closed
mforce wants to merge 1 commit intomainfrom
feat/setup-wizard
Closed

fix: empty token overrides provider default + hardcoded error message#19
mforce wants to merge 1 commit intomainfrom
feat/setup-wizard

Conversation

@mforce
Copy link
Copy Markdown
Owner

@mforce mforce commented May 4, 2026

Summary

Three bugs fixed:

  1. Empty token in config blocks provider defaultclaudely setup saved token: "" which ?? treated as defined, preventing fallthrough to the provider's default token (e.g. "lmstudio"). Now empty strings are skipped when saving, and cli.ts treats empty config values as undefined.

  2. Error message hardcodes 'custom'"provider 'custom' requires --token" fired for ALL providers when token was empty. Now shows the actual provider name and suggests claudely setup.

  3. Setup wizard doesn't show provider defaults — When the saved value differs from the provider default, the prompt now shows both (e.g. Auth token (provider default: lmstudio)).

Test plan

  • npm test — 87 pass
  • claudely setup with lmstudio, clear token → saves without token field
  • claudely --new after saving empty token → uses provider default, no error
  • claudely setup re-run shows provider defaults in prompts

Three fixes:
- setup.ts: don't save token when empty (omit field so provider default
  kicks in via the ?? chain)
- cli.ts: treat empty-string config values as undefined so they don't
  block fallthrough to provider defaults
- cli.ts: error messages now show actual provider name instead of
  hardcoding 'custom', and suggest `claudely setup` as a fix

Also improves setup wizard UX: shows provider defaults in prompts when
the saved value differs from the default.
@mforce mforce closed this May 4, 2026
@mforce mforce deleted the feat/setup-wizard branch May 4, 2026 03:40
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