Skip to content

Show current open file and selected line info in cli #3096

Closed as not planned
Closed as not planned

Description

@ravshansbox

would also like:
include currently open file and selected lines as a context

Activity

  1. github-actions commented on Oct 11, 2025

    @github-actions
    Contributor

    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.

  2. rekram1-node commented on Oct 11, 2025

    @rekram1-node
    Collaborator

    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)

  3. self-assigned this
    on Oct 11, 2025
  4. rekram1-node commented on Oct 11, 2025

    @rekram1-node
    Collaborator

    is this for the vscode integration?

  5. ravshansbox commented on Oct 11, 2025

    @ravshansbox
    ContributorAuthor

    @rekram1-node yes, the vscode extension, sorry for not being explicit

  6. ravshansbox commented on Oct 11, 2025

    @ravshansbox
    ContributorAuthor

    That's the current behaviour of most agents like copilot, claude code, cline, kilo code (these are only the ones I have previously used)

  7. rekram1-node commented on Oct 11, 2025

    @rekram1-node
    Collaborator

    oh okay perfect then this is doable

  8. ravshansbox commented on Oct 11, 2025

    @ravshansbox
    ContributorAuthor

    Are we going to implement both:

    1. show info in cli
    2. auto include as context
  9. rekram1-node commented on Oct 11, 2025

    @rekram1-node
    Collaborator

    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

  10. ravshansbox commented on Oct 11, 2025

    @ravshansbox
    ContributorAuthor

    At least maybe we can add it through explicit setting (opt-in)? It may make migration from other agents easier

  11. rekram1-node commented on Oct 11, 2025

    @rekram1-node
    Collaborator

    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

  12. taqtiqa-mark commented on Oct 12, 2025

    @taqtiqa-mark
    • auto include as context

    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)

  13. benvinegar commented on Nov 9, 2025

    @benvinegar

    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

  14. aiyolo commented on Dec 30, 2025

    @aiyolo

    any progress?

  15. altendky commented on Jan 8, 2026

    @altendky
    Contributor

    i've been working around adjacent to this and have a couple times noticed what i think is this request working.

    await appendPrompt(port, `In ${fileRef}`)

    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:

    1. i would be happy to double check my theory here and fix the existing behavior that's having trouble
    2. i am working on autodetection of the vscode-mcp-server plugin and registering it automatically in the opencode sessions launched by the opencode extension
  16. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions