diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rs index da176ebeee61e..364c6f9663120 100644 --- a/crates/assistant/src/assistant_panel.rs +++ b/crates/assistant/src/assistant_panel.rs @@ -3533,7 +3533,9 @@ impl ContextEditor { for chunk in context.buffer().read(cx).text_for_range(range) { text.push_str(chunk); } - text.push('\n'); + if message.offset_range.end < selection.range().end { + text.push('\n'); + } } } }