From d78cb7b1e09bb9ff22fc9e3323ec3b18e03dbcbf Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 12 Jul 2023 16:41:58 -0700 Subject: getVisibleFiles --- extension/src/continueIdeClient.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'extension/src/continueIdeClient.ts') diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts index 304c592b..b728833f 100644 --- a/extension/src/continueIdeClient.ts +++ b/extension/src/continueIdeClient.ts @@ -131,6 +131,11 @@ class IdeProtocolClient { openFiles: this.getOpenFiles(), }); break; + case "visibleFiles": + messenger.send("visibleFiles", { + visibleFiles: this.getVisibleFiles(), + }); + break; case "readFile": messenger.send("readFile", { contents: this.readFile(data.filepath), @@ -330,6 +335,12 @@ class IdeProtocolClient { }); } + getVisibleFiles(): string[] { + return vscode.window.visibleTextEditors.map((editor) => { + return editor.document.uri.fsPath; + }); + } + saveFile(filepath: string) { vscode.window.visibleTextEditors.forEach((editor) => { if (editor.document.uri.fsPath === filepath) { -- cgit v1.2.3-70-g09d2