opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: add manual refresh shortcut for models in tui

Open sazary opened this issue 1 month ago • 7 comments

resolves #4734

some notes about changes:

  • i think it's "cleaner" to have a way to just get new providers and return new providers using /config/providers?refresh=true, but afaik it needed much changes in the sync provider, specifically in the bootstrap method. so i did what was previously done in dialog-provider: just dispose and rebootstrap the client
  • since this adds the 3rd keybinding to the dialog-model screen, the modal width is not enough for all of them to sit in one row at the bottom of the dialog. one approach is to just wrap them, but imho it wasn't a nice ui. so i added some code to dialog-select to change from row layout to column when they don't fit in just one row. if you don't like it just tell me to remove it and add flexWrap.
  • i updated the js sdk. i didn't try to update stainless since i think it needs an account, and i updated the python sdk but the changes were way too much :) maybe i shouldn't touch that
  • i checked the desktop package to add the shortcut there too, but afaik there was no example of keyboard shortcuts there. i would be happy to add it if you tell me the convention

if there's any issues just let me know

sazary avatar Dec 03 '25 12:12 sazary

@rekram1-node could you please approve for workflows?

sazary avatar Dec 08 '25 20:12 sazary

/review

rekram1-node avatar Dec 08 '25 22:12 rekram1-node

Thanks for making this also if format or sdk fail, just ignore them Dax has something he said he'd fix w/ them.

rekram1-node avatar Dec 08 '25 22:12 rekram1-node

PR may need some small tweaks but this functionality is needed

rekram1-node avatar Dec 08 '25 22:12 rekram1-node

lgtm

github-actions[bot] avatar Dec 08 '25 22:12 github-actions[bot]

sure just tell me about those tweaks

sazary avatar Dec 08 '25 22:12 sazary