microsoft / microsoft/agentrc

Extension: key analysis cache by workspace path for multi-root support

Open
#56 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement vscode-extension
Dominant language
TypeScript
Stars
1.1k
Forks
94
Avg merge
8d 3h
Merged PRs (30d)
7

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in vscode-extension/src/commands/analyze.ts by tracing cachedAnalysis, pickWorkspacePath(), and getCachedAnalysis(). Then inspect its consumers in readiness.ts and instructions.ts. Done means analysis results are not reused across different workspace paths and both consumers receive the analysis for the selected root.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.