Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ node_modules
*.vsix
.nox/
.venv/
**/__pycache__/
**/__pycache__/

# Folder for storing AI generated artifacts
ai-artifacts/*
18 changes: 17 additions & 1 deletion src/features/projectManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export class PythonProjectManagerImpl implements PythonProjectManager {
private readonly updateDebounce = createSimpleDebounce(100, () => this.updateProjects());

initialize(): void {
this.add(this.getInitialProjects());
// Load existing projects from settings without writing back to settings.
// This avoids overwriting user-configured project settings with defaults on reload.
this.loadProjects(this.getInitialProjects());
this.disposables.push(
this._onDidChangeProjects,
new Disposable(() => this._projects.clear()),
Expand Down Expand Up @@ -175,6 +177,20 @@ export class PythonProjectManagerImpl implements PythonProjectManager {
}
}

/**
* Loads projects into the internal map without writing to settings.
* Use this for initial loading from existing settings to avoid overwriting
* user-configured project settings with defaults.
*/
private loadProjects(projects: ProjectArray): void {
projects.forEach((project) => {
this._projects.set(project.uri.toString(), project);
});
if (projects.length > 0) {
this._onDidChangeProjects.fire(Array.from(this._projects.values()));
}
}

create(
name: string,
uri: Uri,
Expand Down
Loading
Loading