You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show current open file and selected line info in cli #3096
Frank may have some opinions but showing info seems reasonable to me, we do support a few mechanisms to easily add files to context already so for that im not 100% sure what his preference would be but i could see utility in that too
The issue, #1990 is also relevant particularly if /add is implemented. This would allow other IDE's to "automagically" populate the context as they see fit (or at least, however they allow their users to)
include currently open file and selected lines as a context
This is a crucial feature that works with Claude Code that I really miss.
Without it, I find myself spending time manually typing out what file and lines I'm looking at as part of my prompts. Whereas with VS Code/Cursor + Claude Code, I'd just select some lines in the editor and be off to the races. cc @jayair
Reacted by Mark Van de Vyver, Andrey, Nick "MakeAvoy" McAvoy, Adam Samulionis, Igor F. Duca, aiyolo, wang-love-yu, Thomas Günther, mateo-trellis, ThunderCls and 1 more
i think the timeout waiting for opencode to startup might be a bit short and getting in the way of this executing properly. the timeout is 2s.
anyways:
i would be happy to double check my theory here and fix the existing behavior that's having trouble
i am working on autodetection of the vscode-mcp-server plugin and registering it automatically in the opencode sessions launched by the opencode extension
Activity
github-actions commentedon Oct 11, 2025
This issue might be a duplicate of existing issues. Please check:
Both issues appear to be requesting similar functionality around displaying/including current open file and line information in the CLI context.
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 11, 2025
currently open file where? I don’t think itd be easy for o do this unless you mean specifically for vscode integration (or a new ide integration)
rekram1-node commentedon Oct 11, 2025
is this for the vscode integration?
ravshansbox commentedon Oct 11, 2025
@rekram1-node yes, the vscode extension, sorry for not being explicit
ravshansbox commentedon Oct 11, 2025
That's the current behaviour of most agents like copilot, claude code, cline, kilo code (these are only the ones I have previously used)
rekram1-node commentedon Oct 11, 2025
oh okay perfect then this is doable
ravshansbox commentedon Oct 11, 2025
Are we going to implement both:
rekram1-node commentedon Oct 11, 2025
Frank may have some opinions but showing info seems reasonable to me, we do support a few mechanisms to easily add files to context already so for that im not 100% sure what his preference would be but i could see utility in that too
ravshansbox commentedon Oct 11, 2025
At least maybe we can add it through explicit setting (opt-in)? It may make migration from other agents easier
rekram1-node commentedon Oct 11, 2025
yeah we do like making everything super customizable so that makes sense
i think adding current open file to context makes sense like cursor does it just needs to be obvious
taqtiqa-mark commentedon Oct 12, 2025
The issue, #1990 is also relevant particularly if
/addis implemented. This would allow other IDE's to "automagically" populate the context as they see fit (or at least, however they allow their users to)benvinegar commentedon Nov 9, 2025
This is a crucial feature that works with Claude Code that I really miss.
Without it, I find myself spending time manually typing out what file and lines I'm looking at as part of my prompts. Whereas with VS Code/Cursor + Claude Code, I'd just select some lines in the editor and be off to the races. cc @jayair
aiyolo commentedon Dec 30, 2025
any progress?
altendky commentedon Jan 8, 2026
i've been working around adjacent to this and have a couple times noticed what i think is this request working.
opencode/sdks/vscode/src/extension.ts
Line 88 in 2e4fe97
i think the timeout waiting for opencode to startup might be a bit short and getting in the way of this executing properly. the timeout is 2s.
anyways:
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.