Skip to content

feat: add model visibility toggle to picker and settings menus#297

Open
ma-juang wants to merge 1 commit intompfaffenberger:mainfrom
ma-juang:feature/model-visibility-toggle
Open

feat: add model visibility toggle to picker and settings menus#297
ma-juang wants to merge 1 commit intompfaffenberger:mainfrom
ma-juang:feature/model-visibility-toggle

Conversation

@ma-juang
Copy link
Copy Markdown

@ma-juang ma-juang commented Apr 19, 2026

Summary

Adds model visibility toggling for the model selection menu.

Problem

Currently the model selection menu that shows up after /model will 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 menus
  • tests/command_line/test_model_visibility_tui.py (added)
  • tests/test_item_visibility.py (added)

Changes

  • 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, and handle corrupted configs
  • Add tests for visibility functionality
  • Tests preserve user's visibility config during test runs

In Action

Screenshot_20260418_223656

Model List (before making changes)

Screenshot_20260418_223510

Model List (after hiding some stuff)

Screenshot_20260418_223550

Model List (after hiding some stuff and toggling the Show all)

- 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
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