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:
@@ -4686,6 +4686,133 @@ mod tests {
|
||||
});
|
||||
}
|
||||
|
||||
/// Checks that action namespaces are the expected set. The purpose of this is to prevent typos
|
||||
/// and let you know when introducing a new namespace.
|
||||
#[gpui::test]
|
||||
async fn test_action_namespaces(cx: &mut gpui::TestAppContext) {
|
||||
use itertools::Itertools;
|
||||
|
||||
init_keymap_test(cx);
|
||||
cx.update(|cx| {
|
||||
let all_actions = cx.all_action_names();
|
||||
|
||||
let mut actions_without_namespace = Vec::new();
|
||||
let all_namespaces = all_actions
|
||||
.iter()
|
||||
.filter_map(|action_name| {
|
||||
let namespace = action_name
|
||||
.split("::")
|
||||
.collect::<Vec<_>>()
|
||||
.into_iter()
|
||||
.rev()
|
||||
.skip(1)
|
||||
.rev()
|
||||
.join("::");
|
||||
if namespace.is_empty() {
|
||||
actions_without_namespace.push(*action_name);
|
||||
}
|
||||
if &namespace == "test_only" || &namespace == "stories" {
|
||||
None
|
||||
} else {
|
||||
Some(namespace)
|
||||
}
|
||||
})
|
||||
.sorted()
|
||||
.dedup()
|
||||
.collect::<Vec<_>>();
|
||||
assert_eq!(actions_without_namespace, Vec::<&str>::new());
|
||||
|
||||
let expected_namespaces = vec![
|
||||
"action",
|
||||
"activity_indicator",
|
||||
"agent",
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
"app_menu",
|
||||
"assistant",
|
||||
"assistant2",
|
||||
"auto_update",
|
||||
"bedrock",
|
||||
"branches",
|
||||
"buffer_search",
|
||||
"channel_modal",
|
||||
"cli",
|
||||
"client",
|
||||
"collab",
|
||||
"collab_panel",
|
||||
"command_palette",
|
||||
"console",
|
||||
"context_server",
|
||||
"copilot",
|
||||
"debug_panel",
|
||||
"debugger",
|
||||
"dev",
|
||||
"diagnostics",
|
||||
"edit_prediction",
|
||||
"editor",
|
||||
"feedback",
|
||||
"file_finder",
|
||||
"git",
|
||||
"git_onboarding",
|
||||
"git_panel",
|
||||
"go_to_line",
|
||||
"icon_theme_selector",
|
||||
"journal",
|
||||
"keymap_editor",
|
||||
"keystroke_input",
|
||||
"language_selector",
|
||||
"line_ending_selector",
|
||||
"lsp_tool",
|
||||
"markdown",
|
||||
"menu",
|
||||
"notebook",
|
||||
"notification_panel",
|
||||
"onboarding",
|
||||
"outline",
|
||||
"outline_panel",
|
||||
"pane",
|
||||
"panel",
|
||||
"picker",
|
||||
"project_panel",
|
||||
"project_search",
|
||||
"project_symbols",
|
||||
"projects",
|
||||
"repl",
|
||||
"rules_library",
|
||||
"search",
|
||||
"settings_editor",
|
||||
"settings_profile_selector",
|
||||
"snippets",
|
||||
"stash_picker",
|
||||
"supermaven",
|
||||
"svg",
|
||||
"syntax_tree_view",
|
||||
"tab_switcher",
|
||||
"task",
|
||||
"terminal",
|
||||
"terminal_panel",
|
||||
"theme_selector",
|
||||
"toast",
|
||||
"toolchain",
|
||||
"variable_list",
|
||||
"vim",
|
||||
"window",
|
||||
"workspace",
|
||||
"zed",
|
||||
"zed_actions",
|
||||
"zed_predict_onboarding",
|
||||
"zeta",
|
||||
];
|
||||
assert_eq!(
|
||||
all_namespaces,
|
||||
expected_namespaces
|
||||
.into_iter()
|
||||
.map(|namespace| namespace.to_string())
|
||||
.sorted()
|
||||
.collect::<Vec<_>>()
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
fn test_bundled_settings_and_themes(cx: &mut App) {
|
||||
cx.text_system()
|
||||
|
||||
Reference in New Issue
Block a user