feat(model-switcher): theme-style split-panel /model picker plugin - #24
Open
12britz wants to merge 1 commit into
Open
feat(model-switcher): theme-style split-panel /model picker plugin#2412britz wants to merge 1 commit into
12britz wants to merge 1 commit into
Conversation
Adds a /model switch plugin mirroring the /theme picker's split-panel look and feel: left pane is a paginated, filterable model list; right pane is a live preview of provider, context window, description, credential status, and pinned agents. Commands: /model interactive split-panel picker /model <name> switch by name /model show show the active model The plugin registers over the core /model entry so the /m alias lands here too. Forces the core_commands import at registration time so the override survives lazy command dispatch (core /model would otherwise be re-registered and clobber the plugin on first dispatch). Adds 16 tests covering command registration/override, by-name switching, filtering, pagination, navigation, rendering, and empty-catalog handling.
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 a theme-style split-panel
/modelpicker plugin (mirrors the/themepicker's look and feel), replacing the core single-pane model picker./model(picker),/model <name>(switch by name),/model show(show active)This is the rework of mpfaffenberger/code_puppy#696, moved to the dedicated plugins repository as requested. The plugin registers over the core
/modelentry so/mlands here too.Bug fix included
The plugin's
/modeloverride was silently replaced by the core handler at first command dispatch:core_commandsis imported lazily on dispatch and re-registered the core/model, clobbering the plugin. The fix forcesimport code_puppy.command_line.core_commandsbefore the plugin registers, so the override wins for the whole session.Tests
tests/test_model_switcher_plugin.py(16 tests): command registration/override, by-name switching, filter, pagination, navigation, rendering, empty-catalog handlingruff check+ruff format --checkclean