mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Add announcement
This commit is contained in:
@@ -4,14 +4,12 @@ export async function getPythonEnvPath(): Promise<string | undefined> {
|
||||
const pythonExtension = vscode.extensions.getExtension("ms-python.python")
|
||||
|
||||
if (!pythonExtension) {
|
||||
console.log("Python extension is not installed.")
|
||||
return undefined
|
||||
}
|
||||
|
||||
// Ensure the Python extension is activated
|
||||
if (!pythonExtension.isActive) {
|
||||
// if the python extension is not active, we can assume the project is not a python project
|
||||
console.log("Python extension is not active.")
|
||||
return undefined
|
||||
}
|
||||
|
||||
@@ -20,12 +18,10 @@ export async function getPythonEnvPath(): Promise<string | undefined> {
|
||||
// Get the active environment path for the current workspace
|
||||
const workspaceFolder = vscode.workspace.workspaceFolders?.[0]
|
||||
if (!workspaceFolder) {
|
||||
console.log("No workspace folder is open.")
|
||||
return undefined
|
||||
}
|
||||
// Get the active python environment path for the current workspace
|
||||
const pythonEnv = await pythonApi?.environments?.getActiveEnvironmentPath(workspaceFolder.uri)
|
||||
console.log("Python environment path:", pythonEnv)
|
||||
if (pythonEnv && pythonEnv.path) {
|
||||
return pythonEnv.path
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user