skip to Main Content

When using GitHub Copilot Chat within Visual Studio Code, I’ve encountered an issue where TypeScript attempts to type check "temporary files" generated by Copilot. These files, identifiable by their hash-based filenames (e.g., c4507d29-b816-4a1c-9f29-c06addfc1204), are not part of my repository. Yet, TypeScript checks produce a plethora of errors, disrupting my workflow. The error messages suggest TypeScript treats these temporary outputs as part of my project, even though they’re out of context and irrelevant to my actual codebase.

enter image description here

My questions are twofold: am I overlooking a straightforward setting or configuration related to GitHub Copilot and TypeScript, or has anyone else encountered this issue, and if so, how was it resolved?

I have tried excluding these files in my tsconfig.json, however I feel like this should not even be happening in the first place. I would expect TypeScript to ignore any generated code unless it is in one of the actual files of the project I am currently working on.

2

Answers


  1. This was a bug. It’s fixed in the latest VS Code Insiders. The fix should also be in VS Code 1.87.1 when that releases. See issue ticket Problems in chat codeblocks show as workspace problems #206644.

    Login or Signup to reply.
  2. Did you end up finding a fix for this? I’ve run into the same issue recently and tried the updated VS Code 1.87.2 and it hasn’t changed anything. Haven’t found a solution to this so far.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search