Skip to content
Open
9 changes: 9 additions & 0 deletions crates/agent_ui/src/acp/completion_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ impl ContextPickerCompletionProvider {
icon_path: Some(mode.icon().path().into()),
documentation: None,
source: project::CompletionSource::Custom,
match_start: None,
insert_text_mode: None,
// This ensures that when a user accepts this completion, the
// completion menu will still be shown after "@category " is
Expand Down Expand Up @@ -146,6 +147,7 @@ impl ContextPickerCompletionProvider {
documentation: None,
insert_text_mode: None,
source: project::CompletionSource::Custom,
match_start: None,
icon_path: Some(icon_for_completion),
confirm: Some(confirm_completion_callback(
thread_entry.title().clone(),
Expand Down Expand Up @@ -177,6 +179,7 @@ impl ContextPickerCompletionProvider {
documentation: None,
insert_text_mode: None,
source: project::CompletionSource::Custom,
match_start: None,
icon_path: Some(icon_path),
confirm: Some(confirm_completion_callback(
rule.title,
Expand Down Expand Up @@ -233,6 +236,7 @@ impl ContextPickerCompletionProvider {
documentation: None,
source: project::CompletionSource::Custom,
icon_path: Some(completion_icon_path),
match_start: None,
insert_text_mode: None,
confirm: Some(confirm_completion_callback(
file_name,
Expand Down Expand Up @@ -279,6 +283,7 @@ impl ContextPickerCompletionProvider {
documentation: None,
source: project::CompletionSource::Custom,
icon_path: Some(icon_path),
match_start: None,
insert_text_mode: None,
confirm: Some(confirm_completion_callback(
symbol.name.into(),
Expand Down Expand Up @@ -311,6 +316,7 @@ impl ContextPickerCompletionProvider {
documentation: None,
source: project::CompletionSource::Custom,
icon_path: Some(icon_path),
match_start: None,
insert_text_mode: None,
confirm: Some(confirm_completion_callback(
url_to_fetch.to_string().into(),
Expand Down Expand Up @@ -379,6 +385,7 @@ impl ContextPickerCompletionProvider {
icon_path: Some(action.icon().path().into()),
documentation: None,
source: project::CompletionSource::Custom,
match_start: None,
insert_text_mode: None,
// This ensures that when a user accepts this completion, the
// completion menu will still be shown after "@category " is
Expand Down Expand Up @@ -695,6 +702,7 @@ impl CompletionProvider for ContextPickerCompletionProvider {
buffer: &Entity<Buffer>,
buffer_position: Anchor,
_trigger: CompletionContext,
_text: Option<&str>,
_window: &mut Window,
cx: &mut Context<Editor>,
) -> Task<Result<Vec<CompletionResponse>>> {
Expand Down Expand Up @@ -751,6 +759,7 @@ impl CompletionProvider for ContextPickerCompletionProvider {
)),
source: project::CompletionSource::Custom,
icon_path: None,
match_start: None,
insert_text_mode: None,
confirm: Some(Arc::new({
let editor = editor.clone();
Expand Down
1 change: 1 addition & 0 deletions crates/agent_ui/src/acp/message_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,7 @@ mod tests {
trigger_kind: CompletionTriggerKind::TRIGGER_CHARACTER,
trigger_character: Some("@".into()),
},
Some("@"),
window,
cx,
)
Expand Down
8 changes: 8 additions & 0 deletions crates/agent_ui/src/context_picker/completion_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ impl ContextPickerCompletionProvider {
icon_path: Some(mode.icon().path().into()),
documentation: None,
source: project::CompletionSource::Custom,
match_start: None,
insert_text_mode: None,
// This ensures that when a user accepts this completion, the
// completion menu will still be shown after "@category " is
Expand Down Expand Up @@ -386,6 +387,7 @@ impl ContextPickerCompletionProvider {
icon_path: Some(action.icon().path().into()),
documentation: None,
source: project::CompletionSource::Custom,
match_start: None,
insert_text_mode: None,
// This ensures that when a user accepts this completion, the
// completion menu will still be shown after "@category " is
Expand Down Expand Up @@ -417,6 +419,7 @@ impl ContextPickerCompletionProvider {
replace_range: source_range.clone(),
new_text,
label: CodeLabel::plain(thread_entry.title().to_string(), None),
match_start: None,
documentation: None,
insert_text_mode: None,
source: project::CompletionSource::Custom,
Expand Down Expand Up @@ -484,6 +487,7 @@ impl ContextPickerCompletionProvider {
replace_range: source_range.clone(),
new_text,
label: CodeLabel::plain(rules.title.to_string(), None),
match_start: None,
documentation: None,
insert_text_mode: None,
source: project::CompletionSource::Custom,
Expand Down Expand Up @@ -524,6 +528,7 @@ impl ContextPickerCompletionProvider {
documentation: None,
source: project::CompletionSource::Custom,
icon_path: Some(IconName::ToolWeb.path().into()),
match_start: None,
insert_text_mode: None,
confirm: Some(confirm_completion_callback(
IconName::ToolWeb.path().into(),
Expand Down Expand Up @@ -612,6 +617,7 @@ impl ContextPickerCompletionProvider {
documentation: None,
source: project::CompletionSource::Custom,
icon_path: Some(completion_icon_path),
match_start: None,
insert_text_mode: None,
confirm: Some(confirm_completion_callback(
crease_icon_path,
Expand Down Expand Up @@ -690,6 +696,7 @@ impl ContextPickerCompletionProvider {
documentation: None,
source: project::CompletionSource::Custom,
icon_path: Some(IconName::Code.path().into()),
match_start: None,
insert_text_mode: None,
confirm: Some(confirm_completion_callback(
IconName::Code.path().into(),
Expand Down Expand Up @@ -738,6 +745,7 @@ impl CompletionProvider for ContextPickerCompletionProvider {
buffer: &Entity<Buffer>,
buffer_position: Anchor,
_trigger: CompletionContext,
_text: Option<&str>,
_window: &mut Window,
cx: &mut Context<Editor>,
) -> Task<Result<Vec<CompletionResponse>>> {
Expand Down
3 changes: 3 additions & 0 deletions crates/agent_ui/src/slash_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ impl SlashCommandCompletionProvider {
new_text,
label: command.label(cx),
icon_path: None,
match_start: None,
insert_text_mode: None,
confirm,
source: CompletionSource::Custom,
Expand Down Expand Up @@ -232,6 +233,7 @@ impl SlashCommandCompletionProvider {
icon_path: None,
new_text,
documentation: None,
match_start: None,
confirm,
insert_text_mode: None,
source: CompletionSource::Custom,
Expand Down Expand Up @@ -263,6 +265,7 @@ impl CompletionProvider for SlashCommandCompletionProvider {
buffer: &Entity<Buffer>,
buffer_position: Anchor,
_: editor::CompletionContext,
_text: Option<&str>,
window: &mut Window,
cx: &mut Context<Editor>,
) -> Task<Result<Vec<project::CompletionResponse>>> {
Expand Down
3 changes: 3 additions & 0 deletions crates/debugger_ui/src/session/running/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ impl CompletionProvider for ConsoleQueryBarCompletionProvider {
buffer: &Entity<Buffer>,
buffer_position: language::Anchor,
_trigger: editor::CompletionContext,
_text: Option<&str>,
_window: &mut Window,
cx: &mut Context<Editor>,
) -> Task<Result<Vec<CompletionResponse>>> {
Expand Down Expand Up @@ -669,6 +670,7 @@ impl ConsoleQueryBarCompletionProvider {
),
new_text: string_match.string.clone(),
label: CodeLabel::plain(string_match.string.clone(), None),
match_start: None,
icon_path: None,
documentation: Some(CompletionDocumentation::MultiLineMarkdown(
variable_value.into(),
Expand Down Expand Up @@ -782,6 +784,7 @@ impl ConsoleQueryBarCompletionProvider {
documentation: completion.detail.map(|detail| {
CompletionDocumentation::MultiLineMarkdown(detail.into())
}),
match_start: None,
confirm: None,
source: project::CompletionSource::Dap { sort_text },
insert_text_mode: None,
Expand Down
1 change: 1 addition & 0 deletions crates/editor/src/code_completion_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ impl CompletionBuilder {
icon_path: None,
insert_text_mode: None,
confirm: None,
match_start: None,
}
}
}
Expand Down
Loading
Loading