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:
parent
526faf287d
commit
804b91aa8c
16 changed files with 926 additions and 728 deletions
|
@ -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(
|
||||
|
|
|
@ -482,7 +482,9 @@ async fn test_extension_store(cx: &mut TestAppContext) {
|
|||
});
|
||||
|
||||
store.update(cx, |store, cx| {
|
||||
store.uninstall_extension("zed-ruby".into(), cx)
|
||||
store
|
||||
.uninstall_extension("zed-ruby".into(), cx)
|
||||
.detach_and_log_err(cx);
|
||||
});
|
||||
|
||||
cx.executor().advance_clock(RELOAD_DEBOUNCE_DURATION);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue