agent: Store if context server should be enabled/disabled in the settings (#32994)

- [x] Show disabled MCP servers in the list so you can enable them again
- [x] If MCP is not present in the settings, add it

Closes #ISSUE

Release Notes:

- agent: Allow to enable/disable context servers permanently in the
agent configuration view

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
Bennet Bo Fenner 2025-06-21 14:46:36 +02:00 committed by GitHub
parent dfdd2b9558
commit 834cdc1271
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 260 additions and 41 deletions

View file

@ -949,6 +949,7 @@ impl ExtensionImports for WasmState {
match settings {
project::project_settings::ContextServerSettings::Custom {
enabled: _,
command,
} => Ok(serde_json::to_string(&settings::ContextServerSettings {
command: Some(settings::CommandSettings {
@ -959,6 +960,7 @@ impl ExtensionImports for WasmState {
settings: None,
})?),
project::project_settings::ContextServerSettings::Extension {
enabled: _,
settings,
} => Ok(serde_json::to_string(&settings::ContextServerSettings {
command: None,