Introduce Settings Icon into Env Manager View#1191
Introduce Settings Icon into Env Manager View#1191eleanorjboyd merged 10 commits intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a settings icon to the Environment Manager view that opens workspace-level search settings, and changes the default workspace search path from an empty array to ["./**/.venv"] to enable automatic discovery of .venv folders in workspaces.
Changes:
- Adds a gear icon button to the env-managers view that opens search path configuration
- Sets default workspace search path to
./**/.venvfor automatic venv discovery - Updates
getWorkspaceSearchPaths()to use default values from package.json when no workspace-specific config exists - Simplifies test assertions and switches from hardcoded paths to more flexible path validation
- Changes
defaultEnvManagerscope from "window" to "application" and removes extension version logging
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds searchSettings command, registers gear icon in env-managers view toolbar, changes workspaceSearchPaths default to ["./**/.venv"], and changes defaultEnvManager scope to "application" |
| package.nls.json | Adds localized title for searchSettings command and updates descriptions for search path settings to mention glob-like discovery |
| src/features/views/envManagerSearch.ts | New file implementing the openSearchSettings function that opens workspace settings filtered to python-envs search paths |
| src/extension.ts | Registers the new searchSettings command handler and removes extension version logging |
| src/managers/common/nativePythonFinder.ts | Updates getWorkspaceSearchPaths to return default values and changes logging from traceLog to traceVerbose with simplified output |
| src/test/managers/common/nativePythonFinder.getAllExtraSearchPaths.unit.test.ts | Simplifies test assertions to be more resilient to cross-platform path differences and updates test data to use absolute paths where appropriate |
Comments suppressed due to low confidence (1)
src/managers/common/nativePythonFinder.ts:750
- The comment was updated from "prefer workspaceFolder > workspace" to "prefer workspaceFolder > workspace > default". While this accurately reflects the new code behavior, it's worth noting that this is a significant behavior change. Previously, when no workspace or workspace folder values were set, the function would return an empty array. Now it will return the default value from package.json.
This change means environments will now be discovered in ./**/.venv by default (once the glob pattern issue is fixed), which could significantly impact performance and behavior for users who haven't explicitly configured this setting. Consider whether this breaking change should be communicated to users through release notes or migration guidance.
// For workspace settings, prefer workspaceFolder > workspace > default
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
fixes #1176