All requested features have been successfully implemented and built.
File: packages/tui/internal/app/app.go:490-492
What it does:
- Runs auto-detection on every startup (not just first run)
- Silently detects authenticated providers without interrupting workflow
- Automatically picks up newly authenticated providers
Code change:
// BEFORE: Only on first run
if a.isFirstRun() {
autoDetectCmd = a.autoDetectAllCredentials()
}
// AFTER: Every startup
autoDetectCmd = a.autoDetectAllCredentialsQuiet()File: packages/tui/internal/app/app.go:1015-1074
What it does:
- Shows friendly messages with provider names
- Examples:
- "All providers ready: OpenAI, Anthropic, Google ✓"
- "Ready: OpenAI, Anthropic ✓" (if only 2 authenticated)
- "Ready: OpenAI ✓" (if only 1 authenticated)
Code: New autoDetectAllCredentialsQuiet() function
Files:
packages/tui/internal/app/app.go:386-490packages/tui/internal/tui/tui.go:1276-1285packages/tui/internal/commands/command.go:298-306
What it does:
- Tab → Cycles to next authenticated provider
- Shift+Tab → Cycles to previous authenticated provider
- Shows toast: "→ Provider: Model"
- Only cycles through authenticated providers (not all available)
- Remembers most recently used model per provider
Code changes:
// New function: CycleAuthenticatedProviders()
// - Gets authenticated providers from AuthBridge
// - Finds current provider index
// - Cycles to next/previous
// - Updates app state and shows toast✓ Found auth.json at: ~/.local/share/rycode/auth.json
Contents:
{
"openai": {
"type": "api",
"apiKey": "sk-test-key-for-testing"
},
"anthropic": {
"type": "api",
"apiKey": "sk-ant-test-key-for-testing"
},
"google": {
"type": "api",
"apiKey": "test-google-key"
}
}Status: 3 providers configured (OpenAI, Anthropic, Google)
✓ RyCode server running on port 4096 (PID: 59608) ✓ TUI instance connected (PID: 11267)
-
Start a new TUI instance:
./bin/rycode
-
Expected: Immediately see toast message:
- "All providers ready: OpenAI, Anthropic, Google ✓"
- Or if not all providers: "Ready: OpenAI, Anthropic ✓"
- With TUI running, press Tab
- Expected: Toast shows "→ Anthropic: Claude Sonnet"
- Press Tab again
- Expected: Toast shows "→ Google: Gemini Pro"
- Press Tab again
- Expected: Toast shows "→ OpenAI: GPT-4" (or Codex)
- Press Tab again
- Expected: Cycles back to first provider
- Press Shift+Tab
- Expected: Cycles backward through providers
- Shows same toast format: "→ Provider: Model"
- If only one provider is authenticated
- Press Tab
- Expected: Toast shows "Only one provider authenticated"
- Remove/rename auth.json
- Start TUI
- Press Tab
- Expected: Toast shows "No authenticated providers. Press 'd' in /model to auto-detect."
| File | Lines | Changes |
|---|---|---|
packages/tui/internal/app/app.go |
490-492, 386-490, 1015-1074 | Auto-detect, Tab cycling, improved toasts |
packages/tui/internal/tui/tui.go |
1276-1285 | Tab key handlers |
packages/tui/internal/commands/command.go |
298-306 | Command descriptions |
packages/tui/MULTI_PROVIDER_UX_IMPROVEMENTS.md |
Full file | Complete documentation |
1. Open RyCode
→ Toast: "All providers ready: OpenAI, Anthropic, Google ✓"
2. Start typing your prompt
→ Uses last selected model (e.g., Claude Sonnet)
3. Press Tab
→ Toast: "→ Google: Gemini Pro"
→ Now using Google
4. Press Tab again
→ Toast: "→ OpenAI: GPT-4"
→ Now using OpenAI
5. Press Shift+Tab
→ Toast: "→ Google: Gemini Pro"
→ Back to Google
1. Terminal: rycode auth login
→ Add Qwen provider
2. RyCode (already open)
→ Auto-detects on next startup
3. Restart RyCode
→ Toast: "All providers ready: OpenAI, Anthropic, Google, Qwen ✓"
4. Press Tab repeatedly
→ Qwen now appears in rotation
1. Look at status bar
→ Future enhancement: "4 providers ✓"
2. Press Tab to verify
→ Cycles through all authenticated providers
→ No need to open /model dialog
| Feature | Status | Notes |
|---|---|---|
| Auto-detect on startup | ✅ Implemented | Runs every time, not just first run |
| Improved startup toast | ✅ Implemented | Shows provider names |
| Tab cycling forward | ✅ Implemented | Cycles through authenticated only |
| Tab cycling backward (Shift+Tab) | ✅ Implemented | Reverse cycling |
| Toast feedback | ✅ Implemented | "→ Provider: Model" format |
| Build successful | ✅ Complete | Binary at ./bin/rycode |
Status: ✅ ALL FEATURES IMPLEMENTED AND READY
Next Steps:
- Start the TUI:
./bin/rycode - Watch for startup toast with provider names
- Press Tab to cycle between OpenAI, Anthropic, and Google
- Add more providers (Qwen, etc.) to test with 4+ providers
Complete implementation documentation available at:
packages/tui/MULTI_PROVIDER_UX_IMPROVEMENTS.md
You now have a seamless multi-provider experience:
- ✅ Auto-detects providers on every startup
- ✅ Shows friendly toast with provider names
- ✅ Tab key instantly switches between authenticated providers
- ✅ No manual auth prompts if already authenticated
- ✅ Intelligent model selection per provider
The workflow you envisioned is now reality: Open RyCode, see all your authenticated providers, and Tab between them effortlessly! 🚀