This optimizes and fixes bugs in our logic for maintaining a set of running context servers, based on the combination of the user's `context_servers` settings and their installed extensions. Release Notes: - N/A --------- Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
27 lines
708 B
Rust
27 lines
708 B
Rust
pub mod client;
|
|
pub mod manager;
|
|
pub mod protocol;
|
|
mod registry;
|
|
pub mod types;
|
|
|
|
use command_palette_hooks::CommandPaletteFilter;
|
|
use gpui::{actions, AppContext};
|
|
use settings::Settings;
|
|
|
|
use crate::manager::ContextServerSettings;
|
|
pub use crate::registry::ContextServerFactoryRegistry;
|
|
|
|
actions!(context_servers, [Restart]);
|
|
|
|
/// The namespace for the context servers actions.
|
|
pub const CONTEXT_SERVERS_NAMESPACE: &'static str = "context_servers";
|
|
|
|
pub fn init(cx: &mut AppContext) {
|
|
ContextServerSettings::register(cx);
|
|
ContextServerFactoryRegistry::default_global(cx);
|
|
|
|
CommandPaletteFilter::update_global(cx, |filter, _cx| {
|
|
filter.hide_namespace(CONTEXT_SERVERS_NAMESPACE);
|
|
});
|
|
}
|