Allow search assistant editors

Antonio Scandurra created

Change summary

crates/ai/src/assistant.rs | 9 +++++++++
1 file changed, 9 insertions(+)

Detailed changes

crates/ai/src/assistant.rs 🔗

@@ -221,6 +221,8 @@ impl AssistantPanel {
                 cx.focus_self();
                 cx.notify();
             }
+        } else {
+            cx.propagate_action();
         }
     }
 
@@ -1144,6 +1146,13 @@ impl Item for AssistantEditor {
     fn tab_tooltip_text(&self, cx: &AppContext) -> Option<Cow<str>> {
         Some(self.title(cx).into())
     }
+
+    fn as_searchable(
+        &self,
+        _: &ViewHandle<Self>,
+    ) -> Option<Box<dyn workspace::searchable::SearchableItemHandle>> {
+        Some(Box::new(self.editor.clone()))
+    }
 }
 
 #[derive(Debug)]