diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-29 22:46:56 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-29 22:46:56 -0700 |
commit | 1da66af471329204dec9749451d533a47212c7fa (patch) | |
tree | ab6e3da7181fe4b298030b0f110f18823e0558ca /extension/src/continueIdeClient.ts | |
parent | acb5f920a2d1640b8cc2a3e6f2db1f7d5a554978 (diff) | |
download | sncontinue-1da66af471329204dec9749451d533a47212c7fa.tar.gz sncontinue-1da66af471329204dec9749451d533a47212c7fa.tar.bz2 sncontinue-1da66af471329204dec9749451d533a47212c7fa.zip |
lock suggestions until done streaming
Diffstat (limited to 'extension/src/continueIdeClient.ts')
-rw-r--r-- | extension/src/continueIdeClient.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts index 2e641054..1ccc070c 100644 --- a/extension/src/continueIdeClient.ts +++ b/extension/src/continueIdeClient.ts @@ -1,5 +1,6 @@ // import { ShowSuggestionRequest } from "../schema/ShowSuggestionRequest"; import { + editorSuggestionsLocked, showSuggestion as showSuggestionInEditor, SuggestionRanges, } from "./suggestions"; @@ -119,6 +120,9 @@ class IdeProtocolClient { this.openFile(data.filepath); // TODO: Close file if False break; + case "setSuggestionsLocked": + this.setSuggestionsLocked(data.filepath, data.locked); + break; case "showSuggestion": this.showSuggestion(data.edit); break; @@ -204,6 +208,11 @@ class IdeProtocolClient { openEditorAndRevealRange(filepath, undefined, vscode.ViewColumn.One); } + setSuggestionsLocked(filepath: string, locked: boolean) { + editorSuggestionsLocked.set(filepath, locked); + // TODO: Rerender? + } + async getUserSecret(key: string) { // Check if secret already exists in VS Code settings (global) let secret = vscode.workspace.getConfiguration("continue").get(key); |