feat: add model visibility toggle to picker and settings menus#297
Open
ma-juang wants to merge 1 commit intompfaffenberger:mainfrom
Open
feat: add model visibility toggle to picker and settings menus#297ma-juang wants to merge 1 commit intompfaffenberger:mainfrom
ma-juang wants to merge 1 commit intompfaffenberger:mainfrom
Conversation
- Add VisibilityStore class for reusable visibility persistence - Add Space key to toggle model visibility (hides selected model) - Add Tab key to show/hide all (session-level filter) - Persist hidden models across sessions via JSON config - Add tests for visibility functionality - Tests preserve user's visibility config during test runs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds model visibility toggling for the model selection menu.
Problem
Currently the model selection menu that shows up after
/modelwill show you a bunch of models, some of which you may not be interested in. Typing the name of a model can be tricky because it's hard to remember all the prefix/postfix for the full model name, and the model list may contain sonnet-4.5, sonnet-4.6, ... and so on.Solution
Add toggling functionality to hide any model you don't want to see. This persists by writing to a config file. You can still search for and see hidden models, and you can hit a button to show all models including hidden ones. If you want to unhide a model, show all -> reselect the ones you want.
The default look and feel is unchanged, except for the hints about the two new keybinds (space and tab). What's added is the ability to customize.
Warning: this does change the core logic but I think it probably needs to. Let me know if there's a better way!
I did look into changing the /agents menu too but the conventions are a little different there than the model selection menu. This PR doesn't include any change for menus other than model selection.
Files in scope
code_puppy/command_line/model_picker_completion.py(changed)code_puppy/command_line/model_settings_menu.py(changed)code_puppy/item_visibility.py(added) - maybe could be leveraged if you want to extend this to other menustests/command_line/test_model_visibility_tui.py(added)tests/test_item_visibility.py(added)Changes
In Action
Model List (before making changes)
Model List (after hiding some stuff)
Model List (after hiding some stuff and toggling the Show all)