Problem
CodeIndexManager combines indexing behavior with workspace resolution, instance creation, caching, and registry-wide cleanup. This makes a small infrastructure responsibility harder to test independently.
Context
A focused first refactoring step related to #1592. This issue does not attempt to fix the indexing failures covered by that umbrella tracker.
Desired behavior
Move workspace selection and manager instance ownership into CodeIndexManagerRegistry, following the existing Registry naming convention. Keep CodeIndexManager focused on an individual workspace's indexing services.
Scope
- Move getInstance, getAllInstances, disposeAll and the workspace-path map into the registry.
- Extract workspace folder selection into a private early-return helper.
- Preserve explicit-path priority, active-editor/first-folder fallback, and one manager per workspace path.
- Preserve actual workspace URIs; use VS Code's file URI API for explicit paths outside open workspace folders.
- Update consumers and test mocks without changing indexing/orchestration behavior.
Acceptance criteria
Constraints
No provider redesign, persisted-setting migration, scanner changes, or broader indexing bug fixes. Canonical file URIs replace the previous hand-built fallback, which can affect URI-derived keys for unusual explicit paths; real workspace URIs remain unchanged.
Related umbrella issue: #1592
Problem
CodeIndexManager combines indexing behavior with workspace resolution, instance creation, caching, and registry-wide cleanup. This makes a small infrastructure responsibility harder to test independently.
Context
A focused first refactoring step related to #1592. This issue does not attempt to fix the indexing failures covered by that umbrella tracker.
Desired behavior
Move workspace selection and manager instance ownership into CodeIndexManagerRegistry, following the existing Registry naming convention. Keep CodeIndexManager focused on an individual workspace's indexing services.
Scope
Acceptance criteria
Constraints
No provider redesign, persisted-setting migration, scanner changes, or broader indexing bug fixes. Canonical file URIs replace the previous hand-built fallback, which can affect URI-derived keys for unusual explicit paths; real workspace URIs remain unchanged.
Related umbrella issue: #1592