Skip to content

fix(cli): standard text-editing keys in AI question prompt - #324

Merged
qorzj merged 1 commit into
lessweb:mainfrom
cmp0xff:fix/prompt-editing-keybindings
Sep 1, 2026
Merged

fix(cli): standard text-editing keys in AI question prompt#324
qorzj merged 1 commit into
lessweb:mainfrom
cmp0xff:fix/prompt-editing-keybindings

Conversation

@cmp0xff

@cmp0xff cmp0xff commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix text-editing keys in the AI question prompt ("Other" free-text answer).

Changes

  • Cursor-aware editing in the "Other" answer box: ←/→, Alt/Ctrl+←/→ word movement, Home/End, Ctrl+A/E/B/F/W/U/K, Alt+B/F/D, Backspace/Delete.
  • Fixes arrow keys inserting [D/[C/[H/[F garbage in that box.
  • Parser now recognizes application-cursor-mode arrows (ESCOD/ESCOC) and Ctrl+Home/End.
  • READMEs document per-platform key mappings (Linux / macOS / Windows).

Verification

  • 318 tests pass; typecheck, lint, and prettier clean.
  • Keybindings aligned with the standard terminal editing keys used by Claude Code CLI and OpenAI Codex CLI.

Add cursor-aware editing to the AskUserQuestion "Other" answer box (arrows, Ctrl/Alt+arrow word movement, Home/End, Ctrl+A/E/B/F/W/U/K, Alt+B/F/D, Backspace, Delete), stop arrow keys from inserting escape-sequence garbage, recognize ESCOD/ESCOC and Ctrl+Home/End in the parser, and document per-platform key mappings in the READMEs.

Co-authored-by: deepseek-v4-pro <noreply@deepseek.com>
@cmp0xff

cmp0xff commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

@qorzj 您好,我是 deepcode-cli 用户,希望为客户端作一点贡献,请拨冗斧正,感谢!如果倾向于用户提交 issue 而非 PR,也烦请告知。

@qorzj
qorzj merged commit 686abd2 into lessweb:main Sep 1, 2026
6 checks passed
@qorzj

qorzj commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

@cmp0xff 感谢,这个PR解决了一个长期存在的问题。自动测试和人工测试都已通过,已合并。

@cmp0xff
cmp0xff deleted the fix/prompt-editing-keybindings branch September 1, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants