diff --git a/crates/agent/src/context_picker/completion_provider.rs b/crates/agent/src/context_picker/completion_provider.rs index 8d93838be6..d86c4105cf 100644 --- a/crates/agent/src/context_picker/completion_provider.rs +++ b/crates/agent/src/context_picker/completion_provider.rs @@ -1,7 +1,5 @@ -use std::cell::RefCell; use std::ops::Range; use std::path::{Path, PathBuf}; -use std::rc::Rc; use std::sync::Arc; use std::sync::atomic::AtomicBool; @@ -912,16 +910,6 @@ impl CompletionProvider for ContextPickerCompletionProvider { }) } - fn resolve_completions( - &self, - _buffer: Entity, - _completion_indices: Vec, - _completions: Rc>>, - _cx: &mut Context, - ) -> Task> { - Task::ready(Ok(true)) - } - fn is_completion_trigger( &self, buffer: &Entity, @@ -1077,7 +1065,7 @@ mod tests { use project::{Project, ProjectPath}; use serde_json::json; use settings::SettingsStore; - use std::ops::Deref; + use std::{ops::Deref, rc::Rc}; use util::{path, separator}; use workspace::{AppState, Item}; diff --git a/crates/assistant_context_editor/src/slash_command.rs b/crates/assistant_context_editor/src/slash_command.rs index 4c34e94e6e..d1dd2c9cd7 100644 --- a/crates/assistant_context_editor/src/slash_command.rs +++ b/crates/assistant_context_editor/src/slash_command.rs @@ -10,9 +10,7 @@ use parking_lot::Mutex; use project::{CompletionIntent, CompletionSource, lsp_store::CompletionDocumentation}; use rope::Point; use std::{ - cell::RefCell, ops::Range, - rc::Rc, sync::{ Arc, atomic::{AtomicBool, Ordering::SeqCst}, @@ -326,16 +324,6 @@ impl CompletionProvider for SlashCommandCompletionProvider { } } - fn resolve_completions( - &self, - _: Entity, - _: Vec, - _: Rc>>, - _: &mut Context, - ) -> Task> { - Task::ready(Ok(true)) - } - fn is_completion_trigger( &self, buffer: &Entity, diff --git a/crates/collab_ui/src/chat_panel/message_editor.rs b/crates/collab_ui/src/chat_panel/message_editor.rs index 4596f5957f..a0df4cd536 100644 --- a/crates/collab_ui/src/chat_panel/message_editor.rs +++ b/crates/collab_ui/src/chat_panel/message_editor.rs @@ -15,7 +15,6 @@ use language::{ use project::{Completion, CompletionResponse, CompletionSource, search::SearchQuery}; use settings::Settings; use std::{ - cell::RefCell, ops::Range, rc::Rc, sync::{Arc, LazyLock}, @@ -73,16 +72,6 @@ impl CompletionProvider for MessageEditorCompletionProvider { }) } - fn resolve_completions( - &self, - _buffer: Entity, - _completion_indices: Vec, - _completions: Rc>>, - _cx: &mut Context, - ) -> Task> { - Task::ready(Ok(false)) - } - fn is_completion_trigger( &self, _buffer: &Entity, @@ -255,7 +244,7 @@ impl MessageEditor { { if !candidates.is_empty() { return cx.spawn(async move |_, cx| { - let completion_response = Self::resolve_completions_for_candidates( + let completion_response = Self::completions_for_candidates( &cx, query.as_str(), &candidates, @@ -273,7 +262,7 @@ impl MessageEditor { { if !candidates.is_empty() { return cx.spawn(async move |_, cx| { - let completion_response = Self::resolve_completions_for_candidates( + let completion_response = Self::completions_for_candidates( &cx, query.as_str(), candidates, @@ -292,7 +281,7 @@ impl MessageEditor { }])) } - async fn resolve_completions_for_candidates( + async fn completions_for_candidates( cx: &AsyncApp, query: &str, candidates: &[StringMatchCandidate], diff --git a/crates/debugger_ui/src/session/running/console.rs b/crates/debugger_ui/src/session/running/console.rs index fa154ec48c..d872f0f636 100644 --- a/crates/debugger_ui/src/session/running/console.rs +++ b/crates/debugger_ui/src/session/running/console.rs @@ -282,16 +282,6 @@ impl CompletionProvider for ConsoleQueryBarCompletionProvider { } } - fn resolve_completions( - &self, - _buffer: Entity, - _completion_indices: Vec, - _completions: Rc>>, - _cx: &mut Context, - ) -> gpui::Task> { - Task::ready(Ok(false)) - } - fn apply_additional_edits_for_completion( &self, _buffer: Entity, diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 9e5704b2cd..d0ca1e4823 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -20325,11 +20325,13 @@ pub trait CompletionProvider { fn resolve_completions( &self, - buffer: Entity, - completion_indices: Vec, - completions: Rc>>, - cx: &mut Context, - ) -> Task>; + _buffer: Entity, + _completion_indices: Vec, + _completions: Rc>>, + _cx: &mut Context, + ) -> Task> { + Task::ready(Ok(false)) + } fn apply_additional_edits_for_completion( &self, diff --git a/crates/inspector_ui/src/div_inspector.rs b/crates/inspector_ui/src/div_inspector.rs index 8b4b796680..05c1e2222c 100644 --- a/crates/inspector_ui/src/div_inspector.rs +++ b/crates/inspector_ui/src/div_inspector.rs @@ -12,7 +12,6 @@ use language::{ }; use project::lsp_store::CompletionDocumentation; use project::{Completion, CompletionResponse, CompletionSource, Project, ProjectPath}; -use std::cell::RefCell; use std::fmt::Write as _; use std::ops::Range; use std::path::Path; @@ -671,16 +670,6 @@ impl CompletionProvider for RustStyleCompletionProvider { }])) } - fn resolve_completions( - &self, - _buffer: Entity, - _completion_indices: Vec, - _completions: Rc>>, - _cx: &mut Context, - ) -> Task> { - Task::ready(Ok(true)) - } - fn is_completion_trigger( &self, buffer: &Entity,