Skip to content

Commit

Permalink
Put all chat code blocks in same implicit JS/TS project (#204655)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz authored Feb 7, 2024
1 parent 20d1817 commit a1fb0dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ 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';

export function getSemanticSupportedSchemes() {
if (isWeb() && vscode.workspace.workspaceFolders) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import * as vscode from 'vscode';
import { officeScript, vscodeNotebookCell } from '../configuration/fileSchemes';
import * as fileSchemes from '../configuration/fileSchemes';
import * as languageModeIds from '../configuration/languageIds';
import * as typeConverters from '../typeConverters';
import { ClientCapability, ITypeScriptServiceClient } from '../typescriptService';
Expand Down Expand Up @@ -227,7 +227,7 @@ class SyncedBuffer {
return tsRoot?.startsWith(inMemoryResourcePrefix) ? undefined : tsRoot;
}

return resource.scheme === officeScript ? '/' : undefined;
return resource.scheme === fileSchemes.officeScript || resource.scheme === fileSchemes.chatCodeBlock ? '/' : undefined;
}

public get resource(): vscode.Uri {
Expand Down Expand Up @@ -395,7 +395,7 @@ class TabResourceTracker extends Disposable {
}

public has(resource: vscode.Uri): boolean {
if (resource.scheme === vscodeNotebookCell) {
if (resource.scheme === fileSchemes.vscodeNotebookCell) {
const notebook = vscode.workspace.notebookDocuments.find(doc =>
doc.getCells().some(cell => cell.document.uri.toString() === resource.toString()));

Expand Down

0 comments on commit a1fb0dc

Please sign in to comment.