From 71b3633c1b5bb2b60c488836d1c8011d2f25f336 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:36:34 -0300 Subject: [PATCH] assistant: Remove automatic diagnostic attachment to tab and file commands (#20297) This PR returns the `/tab` and `/file` commands to their original behavior of _not_ automatically including diagnostics. This is an assistant-only change, though, given that we can already pass the `/diagnostic` command by itself. The inline assistant will still have the diagnostics baked in to allow prompts such as "Fix this error." Release Notes: - Remove automatic diagnostic attachment to tab and file commands in the assistant panel --------- Co-authored-by: Antonio Scandurra --- crates/assistant/src/slash_command/file_command.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crates/assistant/src/slash_command/file_command.rs b/crates/assistant/src/slash_command/file_command.rs index 39647540299a650386e14db53015bdf19cb73b74..9e344aa510d03bdf91ff8da2d91b6769d3f4e151 100644 --- a/crates/assistant/src/slash_command/file_command.rs +++ b/crates/assistant/src/slash_command/file_command.rs @@ -21,8 +21,6 @@ use ui::prelude::*; use util::ResultExt; use workspace::Workspace; -use crate::slash_command::diagnostics_command::collect_buffer_diagnostics; - pub(crate) struct FileSlashCommand; impl FileSlashCommand { @@ -543,8 +541,6 @@ pub fn append_buffer_to_output( output.text.push('\n'); let section_ix = output.sections.len(); - collect_buffer_diagnostics(output, buffer, false); - output.sections.insert( section_ix, build_entry_output_section(prev_len..output.text.len(), path, false, None),