From 7e616cbf6033691cd0f099c28b37e6c3b3a52eba Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Thu, 1 Oct 2026 09:02:19 +0800 Subject: [PATCH] fix(terminal): leave Copilot's file list behind before pressing Enter With the caret at the end of an `@` word Copilot lists matching files, and Enter takes the list's pick instead of sending, so a message that closed on a mention (one picked from the composer's own `@` menu ends that way) sat in Copilot's input unsent. End such a message with a space, as for Gemini. --- src/terminal/composer.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/terminal/composer.rs b/src/terminal/composer.rs index 8c069c78..5f232ba8 100644 --- a/src/terminal/composer.rs +++ b/src/terminal/composer.rs @@ -149,8 +149,8 @@ pub(super) struct Step { /// box as a key of its own; arriving with the rest of the line it is just a /// character. (Amp's shell mode is a leading `$`, which it reads off a paste /// as well.) -/// - **A message with an `@` mention gets a space after it for Gemini and -/// Qwen Code.** +/// - **A message with an `@` mention gets a space after it for Gemini, Qwen +/// Code and Copilot.** /// With the caret at the end of an `@` word it lists matching files, and /// Enter then takes the list's pick instead of sending — so a message whose /// attachments close it would sit in the input, under the box, unsent. @@ -185,7 +185,10 @@ pub(super) fn submit_plan(agent: CLIAgent, text: &str, bracketed: bool) -> Vec