Bug Report
Problem 1: Model list overflow in terminal selection menus
When using a custom provider that returns a large number of models (e.g., an OpenAI-compatible endpoint with 100+ models), the selectOne and selectMany menus in the setup wizard render all items at once. If the model list exceeds the terminal window height:
- Items beyond the visible area are never shown
- Arrow key navigation only cycles through the visible items
- Users cannot access or select models that overflow the terminal
This affects all call sites in internal/cli/cli.go that use selectOne/selectMany:
selectEnabledProviders() — provider family and model selection
promptCustomProviderFromURL() — custom provider model selection
promptAnthropicProviderFromURL() — Anthropic provider model selection
Problem 2: No /provider command to switch providers in CLI
When entering the CLI chat interface, there is no obvious way to switch between configured providers. The /model command requires knowing the full provider/model reference. Users need a /provider command to list and switch providers more intuitively.
Proposed Solution
Fix 1: Viewport scrolling + keyword search in select menus
- Add terminal height detection via
term.GetSize()
- Implement viewport windowing that shows only N items that fit in the terminal
- Add scroll indicators ("↑ N more above" / "↓ N more below")
- Add '/' key to enter search/filter mode for keyword-based filtering
Fix 2: /provider slash command
/provider — list all configured providers with model counts
/provider <name> — switch to that provider's default model
- Tab autocomplete for provider names
- Bilingual i18n support (en/zh)
Files Affected
internal/cli/select.go — viewport scrolling + search
internal/cli/provider.go — new /provider command
internal/cli/chat_tui.go — register /provider
internal/cli/complete.go — /provider autocomplete
internal/cli/help_view.go — /provider in help
internal/cli/model.go — providerNames() helper
internal/control/slash.go — /provider arg completion
internal/i18n/i18n.go — new message fields
internal/i18n/messages_en.go — English translations
internal/i18n/messages_zh.go — Chinese translations
Bug Report
Problem 1: Model list overflow in terminal selection menus
When using a custom provider that returns a large number of models (e.g., an OpenAI-compatible endpoint with 100+ models), the
selectOneandselectManymenus in the setup wizard render all items at once. If the model list exceeds the terminal window height:This affects all call sites in
internal/cli/cli.gothat useselectOne/selectMany:selectEnabledProviders()— provider family and model selectionpromptCustomProviderFromURL()— custom provider model selectionpromptAnthropicProviderFromURL()— Anthropic provider model selectionProblem 2: No /provider command to switch providers in CLI
When entering the CLI chat interface, there is no obvious way to switch between configured providers. The
/modelcommand requires knowing the fullprovider/modelreference. Users need a/providercommand to list and switch providers more intuitively.Proposed Solution
Fix 1: Viewport scrolling + keyword search in select menus
term.GetSize()Fix 2: /provider slash command
/provider— list all configured providers with model counts/provider <name>— switch to that provider's default modelFiles Affected
internal/cli/select.go— viewport scrolling + searchinternal/cli/provider.go— new /provider commandinternal/cli/chat_tui.go— register /providerinternal/cli/complete.go— /provider autocompleteinternal/cli/help_view.go— /provider in helpinternal/cli/model.go— providerNames() helperinternal/control/slash.go— /provider arg completioninternal/i18n/i18n.go— new message fieldsinternal/i18n/messages_en.go— English translationsinternal/i18n/messages_zh.go— Chinese translations