feat(tui): add toggle recent list in model selection dialog#10518
feat(tui): add toggle recent list in model selection dialog#10518IdrisGit wants to merge 7 commits intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
|
typecheck and test is failing because of addition of "model_list_recent_toggle" in the config for the keybind, which required generating the types using the type gen script |
|
@rekram1-node what are your thoughts on this comment (https://discord.com/channels/1391832426048651334/1394667004979445931/1465302781211574417) from @ariane-emory . I would prefer keeping the keybind as it makes the toggle, keyboard accessible on the model selection list itself, however I do understand that it can be tricky to introduce a new keybind and team prefers adding a command first. I have used "ctrl+h" as it and "shift+h" are quite common keybind in TUIs for showing and hiding lists, I open to any suggestions on the keybind itself. |
There was a problem hiding this comment.
The formatting of model_list_recent_toggle across multiple lines is inconsistent with the formatting of the surrounding lines.
There was a problem hiding this comment.
it is being auto formatted by the type gen script, that's why I left it like this
1769446230585.mp4
There was a problem hiding this comment.
Personally, I would recommend setting "formatter": false, in your configuration file and then asking a model to clean it up to be consistent with the formatting of the other nearby items, after which it should save without disruption. The default formatter settings tenaciously insist on disrupting the established formatting in the Opencode source.
0c79978 to
df0dc55
Compare
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
7512162 to
54de8a7
Compare
8f2ee3c to
1d9896a
Compare
|
I took an alternative approach: https://github.com/anomalyco/opencode/pull/9177/changes Make a delete hint appear when you hover over a recent model, allowing you to selectively remove models from the recent list; although I agree once you have your favorite models, most of the quick switches would be expected to be on your favorites. |
What does this PR do?
Add a toggle recent list keybind, to toggle on/off the recent list in model selection list. (default to recent on)
How did you verify your code works?
tested the toggle locally with selecting a model in each category and toggling the recent list and ran multiple sessions to verify the toggle persists across sessions.
screenshot of the new keybind:

recent ON
recent OFF

closes #10408 and maybe also closes #3874