-
Notifications
You must be signed in to change notification settings - Fork 6.7k
fix(tui): resolve keybind conflicts and missing defaults (issue #4997) #8786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
fix(tui): resolve keybind conflicts and missing defaults (issue #4997) #8786
Conversation
…ile.list Resolves a critical vulnerability where symlinks could be used to access files outside the project directory. Implemented `fs.promises.realpath` validation to ensure the actual target path is within the allowed scope. Added regression test in `packages/opencode/test/security/symlink.test.ts`.
…ile.list Resolves a critical vulnerability where symlinks could be used to access files outside the project directory. Implemented `fs.promises.realpath` validation to ensure the actual target path is within the allowed scope. Added regression test in `packages/opencode/test/security/symlink.test.ts`. Fixes anomalyco#101
fix(security): prevent path traversal via symlinks
…lyco#4997) - Fix Ctrl+C behavior on Windows: copies selection if present, otherwise clears/exits. - Resolve Ctrl+A conflict: move `model_provider_list` to `ctrl+alt+m`. - Fix Navigation: map `ctrl+n`/`ctrl+p` to move down/up and history next/prev. - Fix Multiline: ensure `shift+return` is mapped to newline. - Fix Word Navigation: ensure `ctrl+left`/`ctrl+right` are mapped. - Fix Word Deletion: ensure `alt+d` and `option+delete` are mapped.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found several related PRs that address TUI keybinding issues, but none appear to be duplicates of PR #8786. Here are the related PRs: Related PRs (not duplicates):
None of these directly duplicate PR #8786's specific fixes for keybind conflicts and missing defaults related to issue #4997. |
…lyco#4997) - Fix Ctrl+C behavior on Windows: copies selection if present, otherwise clears/exits. - Resolve Ctrl+A conflict: move `model_provider_list` to `ctrl+alt+m`. - Fix Navigation: map `ctrl+n`/`ctrl+p` to move down/up and history next/prev. - Fix Multiline: ensure `shift+return` is mapped to newline. - Fix Word Navigation: ensure `ctrl+left`/`ctrl+right` are mapped. - Fix Word Deletion: ensure `alt+d` and `option+delete` are mapped.
Code reviewFound 3 issues:
opencode/packages/opencode/src/project/project.ts Lines 275 to 281 in 892b6eb
opencode/packages/opencode/src/config/config.ts Lines 680 to 688 in 892b6eb
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
This PR addresses multiple keybinding regressions and conflicts reported in Issue #4997 to improve TUI usability across platforms.
Changes
Ctrl+C Handling (Windows/Linux): Modified the Prompt component to prioritize "Copy" when text is selected. If no text is selected, it falls back to "Clear Input" or "Exit App".
Conflict Resolution:
Remapped model_provider_list from Ctrl+A to Ctrl+Alt+M. This restores the standard Emacs/Readline behavior where Ctrl+A moves the cursor to the start of the line.
Navigation & Editing Defaults:
Added Ctrl+N (Next) and Ctrl+P (Previous) to both history navigation and vertical cursor movement.
Ensured Shift+Enter and Ctrl+Enter trigger a newline.
Ensured Ctrl+Left / Ctrl+Right trigger word-wise navigation.
Ensured Alt+D and Option+Delete trigger word-wise deletion.
Testing
Verified configuration loading and default values via unit tests.
Verified no remaining critical collisions in default keybinds.