agent: Add "Install MCPs" to panel menu (#28616)

Danilo Leal created

Also took the opportunity to rename the "Continue in New Thread" item to
a potentially clearer name.

<img
src="https://github.com/user-attachments/assets/024de07d-f215-4c41-8fbe-652a216b61d9"
width="300"/>

Release Notes:

- N/A

Change summary

crates/agent/src/assistant_panel.rs | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)

Detailed changes

crates/agent/src/assistant_panel.rs 🔗

@@ -1088,20 +1088,30 @@ impl AssistantPanel {
                                             window,
                                             cx,
                                             |menu, _window, _cx| {
-                                                menu.action(
+                                                menu
+                                                    .when(!is_empty, |menu| {
+                                                        menu.action(
+                                                            "Start New From Summary",
+                                                            Box::new(NewThread {
+                                                                from_thread_id: Some(thread_id.clone()),
+                                                            }),
+                                                        ).separator()
+                                                    })
+                                                    .action(
                                                     "New Text Thread",
                                                     NewTextThread.boxed_clone(),
                                                 )
-                                                .when(!is_empty, |menu| {
-                                                    menu.action(
-                                                        "Continue in New Thread",
-                                                        Box::new(NewThread {
-                                                            from_thread_id: Some(thread_id.clone()),
-                                                        }),
-                                                    )
-                                                })
-                                                .separator()
                                                 .action("Settings", OpenConfiguration.boxed_clone())
+                                                .separator()
+                                                .action(
+                                                    "Install MCPs",
+                                                    zed_actions::Extensions {
+                                                        category_filter: Some(
+                                                            zed_actions::ExtensionCategoryFilter::ContextServers,
+                                                        ),
+                                                    }
+                                                    .boxed_clone(),
+                                                )
                                             },
                                         ))
                                     }),