-
Notifications
You must be signed in to change notification settings - Fork 30
feat: add intelligent model picker with favorites, recent usage #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add support for highlighting and sorting a preferred model to the top of the provider list. Users can now set preferred_model in config to specify their preferred provider/model combination (e.g., 'github-copilot/claude-sonnet-4'), which will be visually marked and sorted to the top of the model selection list.
…persistent sorting - Adds <C-f> keybinding to toggle model favorite state in the picker (configurable) - UI shows star for favorites and clock for recent
a644755 to
fe69584
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds an intelligent model picker with favorites and recent usage tracking to enhance the model selection experience. Users can mark models as favorites using <C-f> in the picker, and the list automatically sorts to show favorites first, followed by recently used models, then alphabetically sorted remaining models.
Changes:
- Added state persistence for model favorites and recent usage in
~/.local/state/opencode/model.json - Implemented model picker with visual indicators (star for favorites, clock for recent)
- Added
<C-f>keybinding to toggle favorite status in the model picker - Updated documentation with new feature details and configuration options
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| lua/opencode/ui/icons.lua | Added preferred and last_used icons for both nerdfonts and text presets |
| lua/opencode/provider.lua | Implemented core functionality: state management, model access tracking, favorites toggling, and enhanced picker UI with sorting |
| lua/opencode/config.lua | Added model_picker.toggle_favorite keymap configuration |
| README.md | Added documentation for Model Sorting and Favorites feature with usage instructions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.