Add refresh icon next to Model label in Chat Settings#176
Add refresh icon next to Model label in Chat Settings#176
Conversation
Co-authored-by: tnglemongrass <113173292+tnglemongrass@users.noreply.github.com>
| > | ||
| {{ languages.COM_ADD + ' ' + languages.MODEL }} | ||
| </Button> | ||
| <button |
There was a problem hiding this comment.
Two remarks:
- The ticket says "add refresh icon back to the models list...". Did you check git history, was there such a model refresh button in the past? If yes, how did it look like? Where was it placed?
- Trying out the UI, I think this is not the right place to put that button. It should be placed in the line with the model dropdown. Let's try it next to the "Model" label in the first column.
There was a problem hiding this comment.
Updated in commit b1db539:
-
Git history check: The repository appears to be grafted at commit 9c4b2f5, so I don't have access to earlier history to verify if/how a model refresh button existed previously. The current implementation uses the
i-refreshicon pattern consistent with other refresh buttons in the codebase (e.g., SettingsBasic.vue for preset refresh). -
Positioning updated: Moved the refresh icon next to the "Model" label in the first column of the grid layout as suggested. The icon now appears as:
Model ⟳ [Model Selector ▼]
The refresh icon is wrapped with the label in a flex container within the 120px first column, providing a more compact and intuitive layout that visually associates the refresh action with the model selector.
There was a problem hiding this comment.
- good.
- good. Feel free to add that to the PR as well.
Co-authored-by: tnglemongrass <113173292+tnglemongrass@users.noreply.github.com>
| <button | ||
| class="svg-icon i-refresh w-5 h-5 text-primary shrink-0" | ||
| @click="models.refreshModels" | ||
| :title="languages.COM_REFRESH || 'Refresh model list'" |
There was a problem hiding this comment.
Not sure these hardcoded fallbacks are a typical pattern in this repo. Better double check. (I vote to remove it here)
There was a problem hiding this comment.
Removed in commit e1f2a15. After checking the codebase, I confirmed that hardcoded fallbacks are not a typical pattern - most components use languages.CONSTANT without fallbacks. The :title attribute with the hardcoded fallback has been removed entirely.
e1f2a15 to
b1db539
Compare
464a342 to
8352d26
Compare
2db1918 to
2ac5003
Compare
Description:
Users adding models via the "Add Model" tool had to restart the application to see them in the model selector. Added a refresh icon button next to the "Model" label that calls
models.refreshModels()to scan directories and update the list immediately.Changes Made:
Modified
WebUI/src/components/SettingsChat.vue:useModelsstoreSettingsBasic.vuemodels.refreshModels()from storeThe icon appears in first column, next to the label:
Fixes #161