Commit c11e001
Fix Language Models UI not refreshing on group add/remove (#309495)
The Language Models view did not auto-update when:
- Adding a BYOK model with an invalid configuration (error status)
- Removing a BYOK model group
Root cause: _resolveAllLanguageModels only checked model cache changes
to decide whether to fire onDidChangeLanguageModels. When groups were
added/removed but the model set didn't change (e.g., groups with errors
or empty groups), the event never fired and the UI stayed stale.
Fixes:
1. Add _hasGroupStructureChanged to detect group-level changes (count,
names, statuses) independently of model cache changes
2. Add explicit viewModel.refresh() after delete action, matching the
pattern already used by the managementCommand path
3. Await configureLanguageModelsProviderGroup in addModelsForVendor and
refresh the view model after the add flow completes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 2ec2621 commit c11e001
File tree
2 files changed
+28
-1
lines changed- src/vs/workbench/contrib/chat
- browser/chatManagement
- common
2 files changed
+28
-1
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
| 775 | + | |
775 | 776 | | |
776 | 777 | | |
777 | 778 | | |
| |||
1336 | 1337 | | |
1337 | 1338 | | |
1338 | 1339 | | |
1339 | | - | |
| 1340 | + | |
| 1341 | + | |
1340 | 1342 | | |
1341 | 1343 | | |
1342 | 1344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
| 929 | + | |
929 | 930 | | |
930 | 931 | | |
931 | 932 | | |
| |||
941 | 942 | | |
942 | 943 | | |
943 | 944 | | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
944 | 951 | | |
945 | 952 | | |
946 | 953 | | |
| |||
957 | 964 | | |
958 | 965 | | |
959 | 966 | | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
960 | 985 | | |
961 | 986 | | |
962 | 987 | | |
| |||
0 commit comments