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.
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.

This was a bug. It's supposed to be fixed in the latest VS Code Insiders. The fix should be in 1.88.0 when that releases (you can try that in VS Code Insiders). See issue ticket Problems in chat codeblocks show as workspace problems #206644.
In the meantime, you can edit your
search.excludesetting (if that doesn't work, tryfiles.exclude) to exclude files matching the following pattern (based on the pattern given by TonyH in their answer post, but I think this will be more accurate):[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9](yes, it's verbose. I don't know if it works since I don't use GitHub Copilot, but if the idea works, then it's accurate and is less prone to exclude other things you might care about).There's a related bug with chat stuff being included in references: Functions in Cached Chat files are being discovered as a reference in Visual Studio Code #1055.