facebook

Neighboring tabs support

  1. Copilot4Eclipse – GitHub Copilot on Eclipse
  2.  > 
  3. General Discussion
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #701674 Reply

    douggibson
    Participant

    For context, I’m developing in SystemVerilog. Copilot can do a reasonable job when presented with appropriate context but getting there is a bit challenging. Copilot4Eclipse treats SystemVerilog as plaintext. If I have a struct definition open in a neighboring tab/file then Copilot4Eclipse will include it appropriately in the prompt if that file is ~80 lines. If it’s several thousand lines then it won’t get included even if I have the cursor in the neighboring tab directly on the struct definition. I’ve also tried highlighting the struct with no success. Is there any way to get Copilot4Eclipse to understand that it should include that specific code in the prompt?

    #701682 Reply

    wayne
    Moderator

    Hi Doug,

    A couple of thoughts:

    1) re: Copilot4Eclipse not recognizing the .sv files as systemverilog. You can add new Copilot4Eclipse language identifier for SystemVerilog files. Check out this doc:
    https://www.genuitec.com/products/copilot4eclipse/docs/configuration/languageIds#2-modifying-languageid-file-naming-patterns
    But in this case your languageIds.json file will only contain:

    [
    {
    "id": "systemverilog",
    "name": "SystemVerilog",
    "extensions": [
    ".sv",
    ".svh",
    ".vh"
    ]
    }
    ]

    2: Neighboring Tabs Context
    I wish I had more helpful feedback. There is not much information available for how GitHub Copilot incorporates open IDE tabs in its context. I have found references to the context window size as 2K or 8K tokens. I’m curious if that may explain why your generated code results are better for with a small neighbor editor vs a large one? Later this week I will try some experiments to see if I can intuit what might be happening.

    #701686 Reply

    douggibson
    Participant

    Thanks Wayne. Is Copilot4Eclipse using the same codebase as Github to build context then?

    #701688 Reply

    wayne
    Moderator

    > Is Copilot4Eclipse using the same codebase as Github to build context then

    Yes, that is correct. Our initial strategy is to provide the Eclipse community equivalent functionality as GitHub has implemented for IntelliJ and eventually VS Code.

    Wayne
    Copilot4Eclipse Team

    #701694 Reply

    douggibson
    Participant

    I did a bit of research and it appears that the neighboring tabs code will consider up to 20 tabs but will not consider files greater than 10000 bytes. Could Copilot4Eclipse make those two numbers configurable?

    #701713 Reply

    wayne
    Moderator

    Interesting! Can you share your research sources on this topic please?

    Wayne
    Copilot4Eclipse Team

    #701731 Reply

    douggibson
    Participant

    See https://thakkarparth007.github.io/copilot-explorer/codeviz/templates/code-viz.html#m3055125&pos=1:1 at line 89. I took this as a hint and did some experimenting. There is indeed a filtering of files greater than 10000 bytes.

    #701732 Reply

    wayne
    Moderator

    Interesting! I haven’t looked at that site in a long time. Thanks for reminding me of it. While that code is dated I can confirm the parameters (max tabs, max neighbor file size, max total) still apply in recent versions of the api. As for externalizing those params, more research would be needed to understand how far the internal neighboring snippets impl can be pushed.

    Have a good July 4th.

    W

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Neighboring tabs support

You must be logged in to post in the forum log in