The extension's cachedAnalysis in vscode-extension/src/commands/analyze.ts is a single global variable. With pickWorkspacePath() enabling multi-root selection, if a user analyzes one folder then runs commands against a different folder, the cached analysis may be reused incorrectly (areas/apps from the wrong root).
Current: let cachedAnalysis: RepoAnalysis | undefined
Proposed: Map<string, RepoAnalysis> keyed by fsPath, with invalidation when the picked path differs from what's cached.
This affects getCachedAnalysis() consumers in:
vscode-extension/src/commands/readiness.ts
vscode-extension/src/commands/instructions.ts
Ref: PR #55 review comments analyze.ts, readiness.ts
The extension's
cachedAnalysisinvscode-extension/src/commands/analyze.tsis a single global variable. WithpickWorkspacePath()enabling multi-root selection, if a user analyzes one folder then runs commands against a different folder, the cached analysis may be reused incorrectly (areas/apps from the wrong root).Current:
let cachedAnalysis: RepoAnalysis | undefinedProposed:
Map<string, RepoAnalysis>keyed byfsPath, with invalidation when the picked path differs from what's cached.This affects
getCachedAnalysis()consumers in:vscode-extension/src/commands/readiness.tsvscode-extension/src/commands/instructions.tsRef: PR #55 review comments analyze.ts, readiness.ts