summaryrefslogtreecommitdiff
path: root/extension/src
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-30 00:09:52 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-30 00:09:52 -0700
commit0f61888193569f0c2347238b91540ad27e5d290a (patch)
tree27658c3e18686aa64d7c58f2623e835a23aaae84 /extension/src
parent1da66af471329204dec9749451d533a47212c7fa (diff)
downloadsncontinue-0f61888193569f0c2347238b91540ad27e5d290a.tar.gz
sncontinue-0f61888193569f0c2347238b91540ad27e5d290a.tar.bz2
sncontinue-0f61888193569f0c2347238b91540ad27e5d290a.zip
require python >=3.7, off-by-one err in streaming
Diffstat (limited to 'extension/src')
-rw-r--r--extension/src/activation/environmentSetup.ts12
-rw-r--r--extension/src/lang-server/codeLens.ts4
2 files changed, 12 insertions, 4 deletions
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts
index b8c23733..2d9afaec 100644
--- a/extension/src/activation/environmentSetup.ts
+++ b/extension/src/activation/environmentSetup.ts
@@ -66,10 +66,18 @@ async function getPythonPipCommands() {
vscode.window.showErrorMessage(
"Continue requires Python3. Please install from https://www.python.org/downloads, reload VS Code, and try again."
);
- throw new Error("Python3 is not installed.");
+ throw new Error("Python 3.7 or greater is not installed.");
}
}
- let pipCmd = pythonCmd.endsWith("3") ? "pip3" : "pip";
+
+ const version = stdout.split(" ")[1];
+ if (version < "3.7") {
+ vscode.window.showErrorMessage(
+ "Continue requires Python3 version 3.7 or greater. Please update your Python3 installation, reload VS Code, and try again."
+ );
+ throw new Error("Python3 is not installed.");
+ }
+ const pipCmd = pythonCmd.endsWith("3") ? "pip3" : "pip";
return [pythonCmd, pipCmd];
}
diff --git a/extension/src/lang-server/codeLens.ts b/extension/src/lang-server/codeLens.ts
index 03a9a0a7..21448e31 100644
--- a/extension/src/lang-server/codeLens.ts
+++ b/extension/src/lang-server/codeLens.ts
@@ -21,12 +21,12 @@ class SuggestionsCodeLensProvider implements vscode.CodeLensProvider {
codeLenses.push(
new vscode.CodeLens(range, {
title: "Accept ✅",
- command: locked ? "" : "continue.acceptSuggestion",
+ command: "continue.acceptSuggestion",
arguments: [suggestion],
}),
new vscode.CodeLens(range, {
title: "Reject ❌",
- command: locked ? "" : "continue.rejectSuggestion",
+ command: "continue.rejectSuggestion",
arguments: [suggestion],
})
);