Repository navigation
Conversation
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
7138a65 to
61c4581
Compare
61c4581 to
ab16cd5
Compare
ab16cd5 to
76752ca
Compare
76752ca to
bf5726d
Compare
|
Just rebased this to make it current. |
bf5726d to
0d8995d
Compare
The /switch command, session list selection, fork, quick-switch, and subagent navigation all happened silently with no bus event, making it impossible for plugins and external tools to track which session the user is actively viewing. Now every call to session.get (which the TUI makes on every navigation) publishes a session.activated event with the sessionID, giving plugins a reliable signal to update their state.
… TUI VS Code's terminal does not support the Kitty keyboard protocol (microsoft/vscode#286809 was closed), so enabling it has no benefit and triggers a shortcut dispatch bug where IDE keybindings like Cmd+Shift+E and Ctrl+Shift+G stop forwarding while the TUI has focus (microsoft/vscode#304806). It also triggers a Chromium regression where numpad keys are reported as "Unidentified" when Kitty protocol is active, causing them to be silently dropped (microsoft/vscode#299374). Detect VS Code's terminal via TERM_PROGRAM=vscode (also set by Cursor and Windsurf) and pass false to useKittyKeyboard to prevent the protocol from being activated. No functionality is lost since VS Code's terminal never supported Kitty to begin with. Fixes anomalyco#27006 Fixes anomalyco#16100
0d8995d to
3a392bb
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #27006
Closes #16100
Type of change
What does this PR do?
When opencode runs in VS Code's integrated terminal (and forks like Cursor/Windsurf), IDE keyboard shortcuts stop forwarding to the IDE while the TUI has focus. This affects shortcuts like Cmd+Shift+E (file explorer), Ctrl+Shift+G (git sidebar), Cmd+Option+K (file reference prefill), and others.
The root issue is that VS Code's terminal does not support the Kitty keyboard protocol — microsoft/vscode#286809 was closed without implementing it. Enabling Kitty has no benefit in VS Code, but it triggers a keybinding dispatch bug (microsoft/vscode#304806) where the shortcut resolves correctly via "soft dispatching" but the event "cannot be dispatched" — the raw keystroke leaks to the terminal where the modifier key gets stripped.
It also triggers a Chromium regression (microsoft/vscode#299374) where numpad keys are reported as
"Unidentified"when Kitty protocol is active, causing them to be silently dropped (#16100).The fix detects VS Code's integrated terminal via
TERM_PROGRAM=vscode(which Cursor and Windsurf also set since they're VS Code forks) and disables the Kitty keyboard protocol for that session by passingfalsetouseKittyKeyboard. No functionality is lost since VS Code's terminal never supported Kitty to begin with. All other terminals retain full Kitty support.How did you verify your code works?
Ran
bun devfrom a Cursor integrated terminal:Typecheck passes: all 14 packages pass
bun turbo typecheck.Screenshots / recordings
N/A — no UI changes, only keyboard input handling.
Checklist