agent: Fix issue where unconfigured MCP extensions would not start server (#33365)

Release Notes:

- agent: Fix an issue where MCP servers that were provided by extensions
would sometimes not start up
This commit is contained in:
Bennet Bo Fenner
2025-06-25 11:48:38 +02:00
committed by GitHub
parent 108162423d
commit 1c6b4712a3
4 changed files with 13 additions and 9 deletions
+1 -4
View File
@@ -505,10 +505,7 @@ impl ContextServerStore {
{
configured_servers
.entry(id)
.or_insert(ContextServerSettings::Extension {
enabled: true,
settings: serde_json::json!({}),
});
.or_insert(ContextServerSettings::default_extension());
}
let (enabled_servers, disabled_servers): (HashMap<_, _>, HashMap<_, _>) =
+7
View File
@@ -111,6 +111,13 @@ pub enum ContextServerSettings {
}
impl ContextServerSettings {
pub fn default_extension() -> Self {
Self::Extension {
enabled: true,
settings: serde_json::json!({}),
}
}
pub fn enabled(&self) -> bool {
match self {
ContextServerSettings::Custom { enabled, .. } => *enabled,