Repository navigation
fix(cli): support newline fallbacks in OpenTUI chat - #24
Merged
Merged
Conversation
Terminals without modified-key reporting send Shift+Enter as plain Enter. Add backslash+Enter line continuation, update the help hint, test the legacy fallbacks, and document terminal-specific newline keys. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The fallback can delete an active text selection when its cursor follows a backslash.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds portable newline fallbacks for OpenTUI chat across terminals with limited modified-key support.
Changes:
- Adds
\+Enter line continuation. - Expands newline shortcut coverage and documentation.
- Tests backslash and Option/Meta+Enter handling.
| File | Description |
|---|---|
api/core/library/cliOpenTui.ts |
Implements fallback and updates footer help. |
scripts/test-cli-opentui.mjs |
Tests newline fallback inputs. |
README.md |
Documents terminal compatibility and VS Code setup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Avoid deleting an active selection when Enter is pressed with the cursor after a backslash, and add a regression test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Summary
In the OpenTUI chat, Shift+Enter submitted the message instead of inserting a newline in terminals that don't report modified Enter keys (macOS Terminal, VS Code integrated terminal). They send Shift+Enter as a plain
\r, which is indistinguishable from Enter.Changes:
\and pressing Enter removes the backslash and inserts a newline (handled inonSubmit).\+Enter.scripts/test-cli-opentui.mjsto cover\+Enter and Option/Meta+Enter.keybindings.jsonsnippet that maps Shift+Enter toESC CR.Validation
npm run typecheck— passednpm run build— passednpm test -- --runInBand— passed (45 suites, 376 tests)node --experimental-ffi scripts/test-cli-opentui.mjs(Node 26.10; Bun unavailable locally fornpm run test:cli-opentui) — passedChecklist