continuedev / continuedev/continue
CLI: Delete acts as Backspace and End is unsupported; editing keys cannot be configured
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
mainat commit5522c6f44ca0ac3528b37244818fbfa39b5af470and 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:
- Start
cnin a terminal. - Type
abcd. - Press Left twice, placing the cursor at
ab|cd(|denotes the cursor). - Press physical Delete.
- Expected:
ab|d. - Source-predicted result:
a|cd.
- Expected:
- Reset to
ab|cdand press Backspace.- Expected:
a|cd; preserve this behavior.
- Expected:
- Reset to
ab|cdand press End.- Expected:
abcd|. - The inspected path provides no End action.
- Expected:
Source evidence
- TextBuffer.ts:492–498 routes both
key.deleteandkey.backspacetodeleteBackward(). The comment explains that this accommodates Mac Backspace being reported askey.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.jsrecognizes End sequences, butuse-input.jsclears their text input and exposes noendflag 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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