Start on adding support for editing via the assistant panel (#14795)

Note that this shouldn't have any visible user-facing behavior yet. The
feature is incomplete but we wanna merge early to avoid a long-running
branch.

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2024-07-19 11:13:15 +02:00 committed by GitHub
parent 87457f9ae8
commit 4d177918c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 1999 additions and 968 deletions

View file

@ -716,7 +716,7 @@ impl ProjectSearchView {
let model = cx.new_model(|cx| ProjectSearch::new(workspace.project().clone(), cx));
let search = cx.new_view(|cx| ProjectSearchView::new(model, cx, None));
workspace.add_item_to_active_pane(Box::new(search.clone()), None, cx);
workspace.add_item_to_active_pane(Box::new(search.clone()), None, true, cx);
search.update(cx, |search, cx| {
search
.included_files_editor
@ -768,6 +768,7 @@ impl ProjectSearchView {
workspace.add_item_to_active_pane(
Box::new(cx.new_view(|cx| ProjectSearchView::new(model, cx, None))),
None,
true,
cx,
);
}
@ -800,7 +801,7 @@ impl ProjectSearchView {
});
let search = if let Some(existing) = existing {
workspace.activate_item(&existing, cx);
workspace.activate_item(&existing, true, true, cx);
existing
} else {
let settings = cx
@ -817,7 +818,7 @@ impl ProjectSearchView {
let model = cx.new_model(|cx| ProjectSearch::new(workspace.project().clone(), cx));
let view = cx.new_view(|cx| ProjectSearchView::new(model, cx, settings));
workspace.add_item_to_active_pane(Box::new(view.clone()), None, cx);
workspace.add_item_to_active_pane(Box::new(view.clone()), None, true, cx);
view
};