Commit a67e024
committed
fix(web): make provider deletion stick in the settings panel and model picker
Deleting a provider from the Providers panel looked like a no-op, and the
provider's models stayed in the model picker even after removing it from
config.toml by hand. Four defects lined up:
- The daemon answers DELETE /providers/{id} with 204 and no body, and the
web transport parsed every response as JSON, so the delete always
rejected client-side after the server had already applied it.
- The redesigned panel called the raw API without a catch and skipped the
client facade, so the failure was silent and the model picker's
providers+models were never reloaded.
- The background catalog refresh took one config snapshot, fetched over
the network, then wrote the whole providers/models tables back, which
resurrected any provider deleted in between. The write-back now
reconciles against the live user config: providers removed meanwhile
stay removed (their models too), providers added meanwhile are kept.
- Deletion filtered model rows on 'provider' only while resolution honours
'provider_id' as well, so rows keyed that way outlived their provider.
Every provider-scoped model filter now uses the same resolution.
The web client also reloads providers and models when the daemon reports
a config change that touches them, so an external config.toml edit is
reflected in the picker without a page reload.1 parent 30f8e2d commit a67e024
109 files changed
Lines changed: 420 additions & 257 deletions
File tree
- .changeset
- apps
- pythinker-code/dist-web
- assets
- pythinker-web
- src
- api
- daemon
- components/settings
- composables
- test
- packages
- agent-core-v2
- src
- app/kosongConfig
- kosong/model
- test/app/kosongConfig
- agent-gateway
- src/routes
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments