Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Merge branch 'main' of github.com:zed-industries/zed into model_cleanup

KCaverly142b94bdd442
diff --cc crates/assistant/src/assistant_panel.rs
index d0c7e7e8831,0dee8be510c..03eb3c238f9
--- a/crates/assistant/src/assistant_panel.rs
+++ b/crates/assistant/src/assistant_panel.rs
@@@ -291,8 -289,14 +291,8 @@@ impl AssistantPanel
cx: &mut ViewContext<Self>,
project: &ModelHandle<Project>,
) {
- let api_key = if let Some(api_key) = self.api_key.borrow().clone() {
- api_key
- } else {
- return;
- };
-
let selection = editor.read(cx).selections.newest_anchor().clone();
- if selection.start.excerpt_id() != selection.end.excerpt_id() {
+ if selection.start.excerpt_id != selection.end.excerpt_id {
return;
}
let snapshot = editor.read(cx).buffer().read(cx).snapshot(cx);
diff --cc crates/assistant/src/codegen.rs
index 8d8e49902f1,6b79daba420..0466259b24d
--- a/crates/assistant/src/codegen.rs
+++ b/crates/assistant/src/codegen.rs
@@@ -1,7 -1,7 +1,7 @@@
use crate::streaming_diff::{Hunk, StreamingDiff};
-use ai::completion::{CompletionProvider, OpenAIRequest};
+use ai::completion::{CompletionProvider, CompletionRequest};
use anyhow::Result;
- use editor::{multi_buffer, Anchor, MultiBuffer, MultiBufferSnapshot, ToOffset, ToPoint};
+ use editor::{Anchor, MultiBuffer, MultiBufferSnapshot, ToOffset, ToPoint};
use futures::{channel::mpsc, SinkExt, Stream, StreamExt};
use gpui::{Entity, ModelContext, ModelHandle, Task};
use language::{Rope, TransactionId};