fix(vscode): push active editor selection to TUI via lock file#27662
fix(vscode): push active editor selection to TUI via lock file#27662Restodecoca wants to merge 5 commits into
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Found a potential related PR: PR #18649: "feat: live IDE context awareness" This PR appears related as it addresses IDE context awareness, which aligns with the goal of pushing active editor selection to the TUI. It may be addressing similar or overlapping functionality for automatically including currently open file and selected lines as context. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Also relates to #27420 — opencode's own VS Code extension not showing file/selection context while the Claude Code extension does. |
d2f23ce to
37692b1
Compare
|
Also worth noting: this PR prevents cross-project context pollution. Each WebSocket server writes its own lock file with the correct Related: #26852 (stale |
Issue for this PR
Closes #22235
Related: #3095, #3096, #27420, #3472, #7275
Type of change
What does this PR do?
The VS Code extension's documented context awareness feature never worked because
the extension had no mechanism to push the active editor file and text selection
to the opencode TUI. This adds a WebSocket server that writes a lock file to
~/.claude/ide/.lock — the same protocol used by Claude Code and Cursor —
allowing the TUI to discover and receive real-time selection_changed events.
How did you verify your code works?
selecting text
Screenshots / recordings
opencode.-.arquitetura-etapa-1.3-modelagem-inicial-api-poc-86agd9a2m.-.Visual.Studio.Code.2026-05-15.00-58-02.mp4
Checklist