chore: remove dead Copilot inspection code#1661
Merged
chagong merged 1 commit intoJun 10, 2026
Merged
Conversation
The Copilot-powered Java inspection feature under src/copilot was disabled in microsoft#1343 (v0.27.0) by removing its activation entry from extension.ts, but the implementation was left behind as unreferenced dead code. Nothing in the extension imports it, no command/menu contributions reference it, and it never runs. Remove the entire src/copilot directory. Build and typecheck pass; no dependency or package.json contribution changes are needed (lodash and the telemetry wrapper remain used elsewhere).
There was a problem hiding this comment.
Pull request overview
Removes the previously deactivated Copilot-powered Java “inspection” feature implementation by deleting the entire src/copilot/** subtree, reducing bundle size and eliminating dead/unreachable code paths.
Changes:
- Delete the Copilot inspection core (chat wrapper + inspection orchestration and caching).
- Delete all inspection UI renderers (CodeLens, diagnostics, gutter icons, ruler highlights) and command wiring.
- Delete related symbol utilities used only by the removed feature.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/copilot/utils.ts | Removes Copilot inspection utilities (symbol/range helpers, telemetry wrappers, LM API readiness checks). |
| src/copilot/Copilot.ts | Removes the Copilot chat wrapper used by the inspection feature. |
| src/copilot/inspect/SymbolNode.ts | Removes the DocumentSymbol wrapper used for inspection targeting/caching. |
| src/copilot/inspect/Inspection.ts | Removes the inspection data model and indicator-range helper. |
| src/copilot/inspect/InspectionCache.ts | Removes inspection caching keyed by document/symbol snapshots. |
| src/copilot/inspect/InspectionCopilot.ts | Removes the inspection engine that prompts the model and parses suggestions. |
| src/copilot/inspect/commands.ts | Removes command registrations for inspect/fix/ignore flows. |
| src/copilot/inspect/index.ts | Removes the (now-dead) activation entrypoint and dependent-extension waiting logic. |
| src/copilot/inspect/DocumentRenderer.ts | Removes renderer management and rerender/debounce logic for inspection UI. |
| src/copilot/inspect/InspectActionCodeLensProvider.ts | Removes the “Rewrite with new Java syntax” class-level CodeLens provider. |
| src/copilot/inspect/render/InspectionRenderer.ts | Removes the shared renderer interface used by inspection UI implementations. |
| src/copilot/inspect/render/CodeLensRenderer.ts | Removes inspection CodeLens rendering implementation. |
| src/copilot/inspect/render/DiagnosticRenderer.ts | Removes diagnostic publishing + code action generation for fixes. |
| src/copilot/inspect/render/GutterIconRenderer.ts | Removes gutter icon decoration rendering and fix-command hover wiring. |
| src/copilot/inspect/render/RulerHighlightRenderer.ts | Removes overview ruler highlight decoration rendering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wenytang-ms
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes the entire
src/copilot/directory — the Copilot-powered Java "inspection" feature (LLM-generated suggestions rendered as code lenses, gutter icons, ruler highlights, and diagnostics).Why
The feature's activation entry was removed from
extension.tsin #1343 (shipped inv0.27.0), but the implementation itself was left in the tree as unreferenced dead code. On the currentmain:src/copilot/imports any of these modules.activateCopilotInspectionis defined but never called.package.jsoncommand/menu/configuration contributions pointing at it (those were removed in remove entry of Copilot related features. #1343).java.copilot.*commands are only registered programmatically inside the never-invoked activation path.So the code can never run today. Removing it reduces bundle size and eliminates confusion.
Scope / safety
src/copilot/**(15 files).lodashandvscode-extension-telemetry-wrapperremain used elsewhere in the extension.package.jsoncontribution changes needed (none referenced this feature).Validation
npx tsc --noEmit— passes.npm run compile(webpack) — builds successfully.