Wire up AssistantPanelDelegate
based on assistant2
feature flag (#23444)
This PR adjusts how the `AssistantPanelDelegate` global is set to be based on the state of the feature flag. This should prevent `assistant` and `assistant2` from potentially clobbering each other. Release Notes: - N/A
This commit is contained in:
parent
9ee1db3552
commit
1e1997c97b
6 changed files with 16 additions and 6 deletions
|
@ -45,8 +45,6 @@ use workspace::{
|
|||
use zed_actions::assistant::{InlineAssist, ToggleFocus};
|
||||
|
||||
pub fn init(cx: &mut AppContext) {
|
||||
<dyn AssistantPanelDelegate>::set_global(Arc::new(ConcreteAssistantPanelDelegate), cx);
|
||||
|
||||
workspace::FollowableViewRegistry::register::<ContextEditor>(cx);
|
||||
cx.observe_new_views(
|
||||
|workspace: &mut Workspace, _cx: &mut ViewContext<Workspace>| {
|
||||
|
@ -1299,7 +1297,7 @@ impl prompt_library::InlineAssistDelegate for PromptLibraryInlineAssist {
|
|||
}
|
||||
}
|
||||
|
||||
struct ConcreteAssistantPanelDelegate;
|
||||
pub struct ConcreteAssistantPanelDelegate;
|
||||
|
||||
impl AssistantPanelDelegate for ConcreteAssistantPanelDelegate {
|
||||
fn active_context_editor(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue