diff options
author | Ty Dunn <ty@tydunn.com> | 2023-06-29 22:55:14 -0700 |
---|---|---|
committer | Ty Dunn <ty@tydunn.com> | 2023-06-29 22:55:14 -0700 |
commit | a388490f47b44bd693ae27ab99589fe7ac425c77 (patch) | |
tree | 2ead51756ef11e35232e5bf963586c0e71c04bf7 /extension/src/lang-server | |
parent | 8551e46491d84623559f536415f5e6aa46cda6af (diff) | |
parent | d47c4cafb856ffe2efd7d08ceddc8ceda475a8c6 (diff) | |
download | sncontinue-a388490f47b44bd693ae27ab99589fe7ac425c77.tar.gz sncontinue-a388490f47b44bd693ae27ab99589fe7ac425c77.tar.bz2 sncontinue-a388490f47b44bd693ae27ab99589fe7ac425c77.zip |
Merge branch 'main' of github.com:continuedev/continue
Diffstat (limited to 'extension/src/lang-server')
-rw-r--r-- | extension/src/lang-server/codeLens.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/extension/src/lang-server/codeLens.ts b/extension/src/lang-server/codeLens.ts index 5b55589c..03a9a0a7 100644 --- a/extension/src/lang-server/codeLens.ts +++ b/extension/src/lang-server/codeLens.ts @@ -1,5 +1,5 @@ import * as vscode from "vscode"; -import { editorToSuggestions } from "../suggestions"; +import { editorToSuggestions, editorSuggestionsLocked } from "../suggestions"; class SuggestionsCodeLensProvider implements vscode.CodeLensProvider { public provideCodeLenses( @@ -10,6 +10,7 @@ class SuggestionsCodeLensProvider implements vscode.CodeLensProvider { if (!suggestions) { return []; } + const locked = editorSuggestionsLocked.get(document.uri.fsPath.toString()); const codeLenses: vscode.CodeLens[] = []; for (const suggestion of suggestions) { @@ -20,12 +21,12 @@ class SuggestionsCodeLensProvider implements vscode.CodeLensProvider { codeLenses.push( new vscode.CodeLens(range, { title: "Accept ✅", - command: "continue.acceptSuggestion", + command: locked ? "" : "continue.acceptSuggestion", arguments: [suggestion], }), new vscode.CodeLens(range, { title: "Reject ❌", - command: "continue.rejectSuggestion", + command: locked ? "" : "continue.rejectSuggestion", arguments: [suggestion], }) ); |