Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions in Cached Chat files are being discovered as a reference in Visual Studio Code #1055

Closed
jmtread opened this issue Mar 20, 2024 · 3 comments · Fixed by microsoft/vscode#211149
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@jmtread
Copy link

jmtread commented Mar 20, 2024

Hi There

Function names that appear in cached Copilot chat files are being listed in the reference list of functions in the visual studio code editor. Screenshot and Steps to reproduce below.
Q: Is it related to Problems tab issue?
I was unsure if this issue was the same or similar to the now resolved issue that was related to Cached Chat files that were being read and reported on in the Problems tab.

Example of the references index above a function that includes Copilot cached chat files:
image

Version: 1.87.2 (user setup)
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Electron: 27.3.2

  • VS Code Version: 1.87.2 (user setup)
  • OS Version: Windows_NT x64 10.0.22631
  • Logs:

Steps to Reproduce:

  1. Ask copilot chat to create a function that outputs the numbers 1 to 10
  2. If not already provided, Ask CoPilot show an example of how to use the function.
  3. Copy and paste the function from step 1 into a new ps1 or psm1 file.
  4. Wait a second or two for Visual Studio Code to add the references link above the function name in your newly created ps file.
  5. Click on the references link above the function name and you will see that the Copilot Chats cache files are listed as references.

Edit 27Mar24: Improved the steps to reproduce. After reading the reply from @selfagency I Improved the introductory paragraph at the top of this post.

@github-actions github-actions bot added the triage-needed Issues needing to be assigned to the prospective feature owner label Mar 20, 2024
@roblourens roblourens assigned mjbvz and unassigned roblourens Mar 26, 2024
@github-actions github-actions bot removed the triage-needed Issues needing to be assigned to the prospective feature owner label Mar 26, 2024
@selfagency
Copy link

They're also appearing in the Problems view. These are all in response to code snippets suggested in a GitHub Copilot chat session:

image

@jmtread
Copy link
Author

jmtread commented Mar 27, 2024

They're also appearing in the Problems view. These are all in response to code snippets suggested in a GitHub Copilot chat session:

image

G'Day @selfagency,
I believe the problems tab issue is fixed in the current Insiders build 1.88. The stable edition of 1.88 will be released early April.
See: microsoft/vscode#206644 (comment)

I'm hoping @mjbvz can tell us if fix for the Problems tab has also fixed this issue with references feature.

@mjbvz mjbvz added this to the April 2024 milestone Mar 27, 2024
@mjbvz
Copy link

mjbvz commented Mar 27, 2024

Yes the problems is already fixed in 1.88 insiders

Will take a look at the references too next month

@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Apr 23, 2024
@mjbvz mjbvz modified the milestones: April 2024, May 2024 Apr 23, 2024
mjbvz added a commit to mjbvz/vscode that referenced this issue Apr 23, 2024
Fixes microsoft/vscode-copilot-release#1055

This filters out references to code in chat and walkthroughts. Doing this in core because otherwise we will need each extension/language to add this filtering themselves
mjbvz added a commit to microsoft/vscode that referenced this issue May 3, 2024
…211149)

* Don't include internal schemes in references/implementation results

Fixes microsoft/vscode-copilot-release#1055

This filters out references to code in chat and walkthroughts. Doing this in core because otherwise we will need each extension/language to add this filtering themselves

* Add another scheme to the list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants