LSP-copilot icon indicating copy to clipboard operation
LSP-copilot copied to clipboard

Is .gitignore respected?

Open nodesocket opened this issue 2 years ago • 9 comments

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

nodesocket avatar Mar 27 '23 21:03 nodesocket

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.

TerminalFi avatar Mar 27 '23 23:03 TerminalFi

@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

nodesocket avatar Mar 28 '23 01:03 nodesocket

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 avatar Mar 28 '23 01:03 TerminalFi

@jfcherng @timfjord Thoughts on this feature being supported?

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

TerminalFi avatar May 05 '23 01:05 TerminalFi

@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 avatar May 05 '23 01:05 TerminalFi

I fixed the flashing on the statusbar

TerminalFi avatar May 05 '23 01:05 TerminalFi

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

jfcherng avatar May 09 '23 15:05 jfcherng

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

neverbot avatar May 23 '23 12:05 neverbot

Awesome, so perhaps I can close the MR and wait

TerminalFi avatar May 23 '23 12:05 TerminalFi

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

TerminalFi avatar Jun 19 '24 05:06 TerminalFi

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

TerminalFi avatar Jul 02 '24 03:07 TerminalFi