agent: Improve the UX around interacting with MCP servers (#32622)

Still a work in progress! Todos before merging:

- [x] Allow to delete (not just turn off) an MCP server from the panel's
settings view
- [x] Also uninstall the extension upon deleting the server (check if
the extension just provides MCPs)
- [x] Resolve repository URL again
- [x] Add a button to open the configuration modal from the panel's
settings view
- [x] Improve modal UX to install and configure a non-extension MCP

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
This commit is contained in:
Danilo Leal 2025-06-18 19:52:40 -03:00 committed by GitHub
parent 526faf287d
commit 804b91aa8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 926 additions and 728 deletions

View file

@ -838,7 +838,11 @@ impl ExtensionStore {
self.install_or_upgrade_extension_at_endpoint(extension_id, url, operation, cx)
}
pub fn uninstall_extension(&mut self, extension_id: Arc<str>, cx: &mut Context<Self>) {
pub fn uninstall_extension(
&mut self,
extension_id: Arc<str>,
cx: &mut Context<Self>,
) -> Task<Result<()>> {
let extension_dir = self.installed_dir.join(extension_id.as_ref());
let work_dir = self.wasm_host.work_dir.join(extension_id.as_ref());
let fs = self.fs.clone();
@ -846,7 +850,7 @@ impl ExtensionStore {
let extension_manifest = self.extension_manifest_for_id(&extension_id).cloned();
match self.outstanding_operations.entry(extension_id.clone()) {
btree_map::Entry::Occupied(_) => return,
btree_map::Entry::Occupied(_) => return Task::ready(Ok(())),
btree_map::Entry::Vacant(e) => e.insert(ExtensionOperation::Remove),
};
@ -894,7 +898,6 @@ impl ExtensionStore {
anyhow::Ok(())
})
.detach_and_log_err(cx)
}
pub fn install_dev_extension(