Merged
Conversation
Gemini CLI 将 \r 视为 return(默认提交),将 \n 视为 enter(默认不提交); 直接向 PTY 写入包含 \n 的文本会导致换行被吞。 另外 Gemini 对“非可信终端”在 paste 后约 40ms 内的回车有防误触保护, 需要延迟回车避免被当作换行插入。 - TerminalManager:sendText/sendTextAndEnter 支持传入 providerId;Gemini 走显式 bracketed paste - Gemini:粘贴结束后延迟 70ms 再发送 \r(Enter),避免触发 40ms paste 保护窗口 - App:发送时透传 providerId;异常兜底写入同样对 Gemini 走 bracketed paste +(可选)延迟回车 - 新增 terminal-send 工具模块与单测,确保策略稳定 Signed-off-by: Lulu <58587930+lulu-sk@users.noreply.github.com>
77efc44 to
d0af987
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gemini CLI 将 \r 视为 return(默认提交),将 \n 视为 enter(默认不提交); 直接向 PTY 写入包含 \n 的文本会导致换行被吞。
另外 Gemini 对“非可信终端”在 paste 后约 40ms 内的回车有防误触保护,
需要延迟回车避免被当作换行插入。