continuedev / continuedev/continue

CLI: Delete acts as Backspace and End is unsupported; editing keys cannot be configured

Open
#13,265 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
36k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Description

The cn prompt editor does not provide the usual Windows text-editing behavior for physical Delete and End, and there is no documented keybinding configuration to make these keys behave as expected.

Physical Delete is handled as backward deletion, exactly like Backspace. End is also unsupported in the inspected input path. This makes editing prompts frustrating.

Key Expected behavior Behavior indicated by inspected source
Delete Delete one character after the cursor Deletes one character before the cursor
Backspace Delete one character before the cursor Deletes backward; this behavior should be preserved
End Move to the end of the current line No End handler in the inspected input path
Relevant environment info
  • OS: Windows 10, build 19045.
  • Interface: Continue CLI (cn); desired behavior is standard editing in conventional terminals.
  • Local source package version: 1.5.46-hy (custom fork).
  • The Delete handler was also checked against upstream main at commit 5522c6f44ca0ac3528b37244818fbfa39b5af470 and contains the same logic.
  • Locally installed input library: Ink 6.2.2.
  • Evidence: source inspection, not an independently performed interactive terminal reproduction. Terminal version and raw key bytes have not been captured.
To reproduce

Suggested manual reproduction:

  1. Start cn in a terminal.
  2. Type abcd.
  3. Press Left twice, placing the cursor at ab|cd (| denotes the cursor).
  4. Press physical Delete.
    • Expected: ab|d.
    • Source-predicted result: a|cd.
  5. Reset to ab|cd and press Backspace.
    • Expected: a|cd; preserve this behavior.
  6. Reset to ab|cd and press End.
    • Expected: abcd|.
    • The inspected path provides no End action.
Source evidence
  • TextBuffer.ts:492–498 routes both key.delete and key.backspace to deleteBackward(). The comment explains that this accommodates Mac Backspace being reported as key.delete, but the condition applies on every platform.
  • TextBuffer.ts:66–76 already has separate backward and forward character deletion methods.
  • TextBuffer.ts:426–449 hard-codes Ctrl+E to moveToEnd(), which moves to the end of the entire input rather than the current line.
  • In locally installed Ink 6.2.2, parse-keypress.js recognizes End sequences, but use-input.js clears their text input and exposes no end flag to Continue. End support therefore needs attention at the input layer as well.
  • The CLI configuration documentation and TUI documentation provide no user-facing way to rebind these editing keys.
Requested behavior

Support physical Delete as forward character deletion, preserve Backspace as backward character deletion, and support End for line-end navigation. If these behaviors are intended to remain selectable, provide and document configurable bindings or a "conventional" editing mode.

Please distinguish physical Delete from the DEL character sent by Backspace in some terminals. Simply changing every key.delete event to forward deletion would regress Backspace for those terminals.

Related issue

#10535 reports Home/End/Ctrl+Arrow problems in the CLI and is currently closed. This report adds the separate physical Delete/Backspace conflation and the Windows editing/configurability use case.

Log output

No runtime logs collected; findings above are based on source inspection.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with extensions/cli/src/ui/TextBuffer.ts, especially the key handling around lines 492–498 and the existing deletion and movement methods around lines 66–76 and 426–449. Reproduce the behavior in the CLI, then inspect Ink 6.2.2's input handling for physical Delete, Backspace, and End. Done means forward Delete, backward Backspace, and line-end End work without conflating terminal sequences, with any supported bindings documented in the CLI configuration or TUI documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.