- changed status to open
Request to add integration between IC2 and Github Copilot
The Jetbrains IDE integration with Copilot is a great tool. It would be wonderful to extend the integration or add a new IC2 integration to allow the use of Copilot in the Anonymous Apex window.
Official response
Comments (7)
-
repo owner -
repo owner Issue
#2381was marked as a duplicate of this issue. -
repo owner I’ve investigated this a bit and it seems that it’s something that the Github Copilot plugin dev team would need to resolve. The Anonymous Apex and SOQL Query tool window editors aren’t file-backed, and it appears that Copilot is only enabled for editors with physical files behind them. I’ll see if I can log an enhancement request against their plugin explaining how these lightweight editors work, but in the interim, there is a reasonable workaround in the form of scratch files. You can create an Apex scratch file:
to write the same types of contents that you would in the Anonymous Apex or SOQL Query tool windows, and then you can open, execute, and debug the contents of those scratch files using the context actions keyboard shortcut:
Copilot works just fine in those scratch files because they’re backed by physical files:
Again, it’s not a perfect solution, but hopefully it will allow you to take advantage of Copilot while writing ad hoc, REPL-style scripts in IC2 until the Copilot plugin team can provide support for non-file-backed editors.
-
repo owner Unfortunately there’s not a straightforward issue tracker or similar, so I’ve logged the question here:
https://github.com/orgs/community/discussions/62402
Hopefully that will lead to a productive discussion.
-
Thanks for looking into this and the work around Scott!
-
reporter Yes, thanks for the investigation, Scott! Your workaround is very useful in the interim.
-
repo owner - changed status to resolved
Resolving as the remaining issue is one that would need to be addressed in the Copilot plugin.
- Log in to comment
I’ve investigated this a bit and it seems that it’s something that the Github Copilot plugin dev team would need to resolve. The Anonymous Apex and SOQL Query tool window editors aren’t file-backed, and it appears that Copilot is only enabled for editors with physical files behind them. I’ll see if I can log an enhancement request against their plugin explaining how these lightweight editors work, but in the interim, there is a reasonable workaround in the form of scratch files. You can create an Apex scratch file:
to write the same types of contents that you would in the Anonymous Apex or SOQL Query tool windows, and then you can open, execute, and debug the contents of those scratch files using the context actions keyboard shortcut:
Copilot works just fine in those scratch files because they’re backed by physical files:
Again, it’s not a perfect solution, but hopefully it will allow you to take advantage of Copilot while writing ad hoc, REPL-style scripts in IC2 until the Copilot plugin team can provide support for non-file-backed editors.