TerminalFi / LSP-copilot

GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
625 stars 25 forks source link

Is .gitignore respected? #98

Closed nodesocket closed 3 days ago

nodesocket commented 1 year ago

Does this respect .gitignore to prevent sending secrets, passwords, api keys to 3rd parties? Thanks.

TerminalFi commented 1 year ago

By default..no it does not. Is that a feature in the VSCode implementation?

You can likely achieve this by removing the text from the selector setting.


"selector": "source | text | embedding"

If this is a feature that the VSCode version supports. Let me know, I'd like to support it.

nodesocket commented 1 year ago

@TerminalFi that's a great question. Some very trivial testing I did in a project with a .gitignore in VSCode with CoPilot enabled seems to indicate changes in files which are in the .gitignore are being suggested by CoPilot. So, that's very concerning.

I opened a discussion on the official GitHub CoPilot community if you want to follow along and maybe upvote? https://github.com/orgs/community/discussions/51183

TerminalFi commented 1 year ago

Sure, also I think that is a reasonable request and perhaps we can support it via our plug-in as an interim. Will look into it.

TerminalFi commented 1 year ago

@jfcherng @timfjord Thoughts on this feature being supported?

https://user-images.githubusercontent.com/32599364/236362352-2c63bce7-cc9f-4814-842b-6750c5460cb8.mp4

TerminalFi commented 1 year ago

@nodesocket Would this type of implementation meet your expectations?

Essentially LSP-copilot is still enabled in this file. However it respects the .gitignore and updates the status bar. So the Language server still knows you are working in a supported file type but since it is in the .gitignore it will NOT send requests to Copilot

TerminalFi commented 1 year ago

I fixed the flashing on the statusbar

jfcherng commented 1 year ago

Related to https://github.com/TerminalFi/LSP-copilot/pull/106

neverbot commented 1 year ago

I think the Copilot people are working in a .copilotignore specification. Using VS Studio - Insiders it gives the file a specific icon, and Copilot Chat seems to think the file is already working.

I posted it in the github community discussions.

240266558-bc57d00e-b00e-4dc4-bfce-4b10acca8849

Screenshot 2023-05-23 at 13 55 41

TerminalFi commented 1 year ago

Awesome, so perhaps I can close the MR and wait

TerminalFi commented 2 weeks ago

https://github.com/TerminalFi/LSP-copilot/pull/169

TerminalFi commented 3 days ago

https://github.com/TerminalFi/LSP-copilot/releases/tag/v0.2.14