Make sure we don't report errors in chat code blocks (#204779)

This commit is contained in:
Matt Bierner 2024-02-21 08:53:05 -08:00 committed by GitHub
parent 63a3873d11
commit 2ad2a35cad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -16,8 +16,6 @@ export const azurerepos = 'azurerepos';
export const vsls = 'vsls';
export const walkThroughSnippet = 'walkThroughSnippet';
export const vscodeNotebookCell = 'vscode-notebook-cell';
export const memFs = 'memfs';
export const vscodeVfs = 'vscode-vfs';
export const officeScript = 'office-script';
export const chatCodeBlock = 'vscode-chat-code-block';
@ -31,6 +29,7 @@ export function getSemanticSupportedSchemes() {
untitled,
walkThroughSnippet,
vscodeNotebookCell,
chatCodeBlock,
];
}

View file

@ -745,6 +745,10 @@ export default class BufferSyncSupport extends Disposable {
}
private shouldValidate(buffer: SyncedBuffer): boolean {
if (buffer.resource.scheme === fileSchemes.chatCodeBlock) {
return false;
}
if (!this.client.configuration.enableProjectDiagnostics && !this._tabResources.has(buffer.resource)) { // Only validate resources that are showing to the user
return false;
}