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:
@@ -182,7 +182,7 @@ impl ConfigurationSource {
|
||||
parse_input(&editor.read(cx).text(cx)).map(|(id, command)| {
|
||||
(
|
||||
id,
|
||||
ContextServerSettings::Custom {
|
||||
ContextServerSettings::Stdio {
|
||||
enabled: true,
|
||||
command,
|
||||
},
|
||||
@@ -403,7 +403,7 @@ impl ConfigureContextServerModal {
|
||||
|
||||
window.spawn(cx, async move |cx| {
|
||||
let target = match settings {
|
||||
ContextServerSettings::Custom {
|
||||
ContextServerSettings::Stdio {
|
||||
enabled: _,
|
||||
command,
|
||||
} => Some(ConfigurationTarget::Existing {
|
||||
@@ -635,7 +635,6 @@ impl ConfigureContextServerModal {
|
||||
}
|
||||
|
||||
fn render_modal_content(&self, cx: &App) -> AnyElement {
|
||||
// All variants now use single editor approach
|
||||
let editor = match &self.source {
|
||||
ConfigurationSource::New { editor, .. } => editor,
|
||||
ConfigurationSource::Existing { editor, .. } => editor,
|
||||
@@ -712,12 +711,12 @@ impl ConfigureContextServerModal {
|
||||
)
|
||||
} else if let ConfigurationSource::New { is_http, .. } = &self.source {
|
||||
let label = if *is_http {
|
||||
"Run command"
|
||||
"Configure Local"
|
||||
} else {
|
||||
"Connect via HTTP"
|
||||
"Configure Remote"
|
||||
};
|
||||
let tooltip = if *is_http {
|
||||
"Configure an MCP serevr that runs on stdin/stdout."
|
||||
"Configure an MCP server that runs on stdin/stdout."
|
||||
} else {
|
||||
"Configure an MCP server that you connect to over HTTP"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user