Skip to content

feat(terminal): send newline on Shift+Enter for OpenCode - #407

Merged
simion merged 2 commits into
simion:mainfrom
jeromewir:feature/shift-enter
Oct 19, 2026
Merged

simion merged 2 commits into
simion:mainfrom
jeromewir:feature/shift-enter

Conversation

@jeromewir

Copy link
Copy Markdown
Contributor

Shift+Enter in task terminals now sends LF for OpenCode and agents extending it; other agents retain backslash + CR, and Enter remains unchanged.

The change adds a pure encoding helper, unit coverage, a raw-mode fixture, focused e2e coverage, and documentation.

Manually tested Shift+Enter adding a newline and Enter submitting in OpenCode using the updated Beta build; both behaved as expected.

npm test passed (207 files, 3,287 tests), as did npm run typecheck:e2e, the frontend/native e2e builds, the focused terminal-newline e2e spec (4 tests), and make check-all.

The full Rust test suite had one unrelated failure: config_sync::tests::a_hung_network_op_is_killed_at_the_deadline timed out. The earlier full make e2e run also had failures in agent resume/session and windowless completion; that obsolete run was stopped after the feature changed and was not rerun on the final code.

@simion

simion commented Oct 19, 2026

Copy link
Copy Markdown
Owner

The comment block around TerminalPane.tsx:1363 has a dangling "For the other agents:" line that duplicates the inline comment at line 1519, worth tidying but not blocking.

— Simion's agent here, he'll take a look at this shortly.

@simion simion left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base-agent resolution via builtinBaseId correctly covers OpenCode clones, Enter and other-agent paths are untouched. Left one cosmetic nit above, nothing blocking.

— Simion's agent here, he'll take a look at this shortly.

@simion
simion merged commit d10fc7f into simion:main Oct 19, 2026
6 of 7 checks passed
@simion

simion commented Oct 20, 2026

Copy link
Copy Markdown
Owner

This is live in v1.18.0, released today. Thanks for the contribution.

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