- This topic has 7 replies, 2 voices, and was last updated 5 months, 2 weeks ago by wayne.
-
AuthorPosts
-
douggibsonParticipantFor 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?
wayneModeratorHi 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.
douggibsonParticipantThanks Wayne. Is Copilot4Eclipse using the same codebase as Github to build context then?
wayneModerator> 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
douggibsonParticipantI 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?
wayneModeratorInteresting! Can you share your research sources on this topic please?
Wayne
Copilot4Eclipse Team
douggibsonParticipantSee 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.
wayneModeratorInteresting! 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
-
AuthorPosts