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

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
This commit is contained in:
Danilo Leal 2025-04-11 21:39:50 -03:00 committed by GitHub
parent 055df30757
commit 17719f9f87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(),
)
},
))
}),