mcp: Fix source property showing up as undefined in settings (#43417)

Follow up to #39021.

<img width="576" height="141" alt="image"
src="https://github.com/user-attachments/assets/c89885a4-e664-4614-9bb0-86442dff34ee"
/>

- Add migration to remove `source` tag because `ContextServerSettings`
is now untagged
- Fix typos in context server modal
- PR seems to have removed the `test_action_namespaces` test, which I
brought back in this PR

Release Notes:

- Fixed an issue where the `source` property of MCP settings would show
up as unrecognised
This commit is contained in:
Bennet Bo Fenner
2025-11-25 16:03:21 +00:00
committed by GitHub
parent 9cae39449a
commit ab80ef1845
12 changed files with 237 additions and 45 deletions
@@ -192,7 +192,7 @@ pub struct SessionSettingsContent {
#[derive(Deserialize, Serialize, Clone, PartialEq, Eq, JsonSchema, MergeFrom, Debug)]
#[serde(untagged, rename_all = "snake_case")]
pub enum ContextServerSettingsContent {
Custom {
Stdio {
/// Whether the context server is enabled.
#[serde(default = "default_true")]
enabled: bool,
@@ -225,7 +225,7 @@ pub enum ContextServerSettingsContent {
impl ContextServerSettingsContent {
pub fn set_enabled(&mut self, enabled: bool) {
match self {
ContextServerSettingsContent::Custom {
ContextServerSettingsContent::Stdio {
enabled: custom_enabled,
..
} => {
+1 -1
View File
@@ -568,7 +568,7 @@ impl VsCodeSettings {
.filter_map(|(k, v)| {
Some((
k.clone().into(),
ContextServerSettingsContent::Custom {
ContextServerSettingsContent::Stdio {
enabled: true,
command: serde_json::from_value::<VsCodeContextServerCommand>(v.clone())
.ok()