From e90ed33c0d5d7c08284455d7228f5de86ff5693e Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Thu, 1 Oct 2026 09:12:08 +0800 Subject: [PATCH] fix(terminal): paste messages to Kimi Code so they are sent Kimi Code takes keys arriving faster than anyone types for an unbracketed paste, and the Enter right behind a typed line for one of its newlines: a one-line message from the composer sat in Kimi's input with an empty line under it, never sent. Paste every message instead. Kimi knows a bracketed paste for one, sends on the Enter after it at once, and still reads a pasted leading `!`, `?` or `/` as typed. --- src/terminal/composer.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/terminal/composer.rs b/src/terminal/composer.rs index ec629562..0574d5e4 100644 --- a/src/terminal/composer.rs +++ b/src/terminal/composer.rs @@ -143,6 +143,10 @@ pub(super) struct Step { /// - **So is Copilot.** A typed leading `?` is the key that opens its help, /// and the rest of the line goes out without it. Its shell mode is a /// leading `!` it reads off a paste as well. +/// - **So is Kimi Code.** It takes keys arriving faster than typing for an +/// unbracketed paste, and the Enter right behind a typed line for one of its +/// newlines: the message sat in its input, never sent. A bracketed paste it +/// knows for one, and reads its `!`, `?` and `/` off it as typed. /// - **A leading `!` goes to Claude Code, CodeBuddy, Gemini, Qwen Code and /// OpenCode on its own.** It /// switches the input into shell mode only when it is typed into an empty @@ -201,7 +205,11 @@ pub(super) fn submit_plan(agent: CLIAgent, text: &str, bracketed: bool) -> Vec