DanTup · GitHub

@DanTup

This should fix the race that could cause it appear at the bottom instead of the top.
Fixes #5968

@DanTup

gemini-code-assist[bot]

Pull request overview

This PR addresses a race in Quick Fix ordering by moving the custom “Add dependency” fix integration into the LSP middleware, ensuring it appears before server-provided fixes like “Ignore”.

Changes:

  • Remove delayed VS Code registration of AddDependencyCodeActionProvider from extension activation.
  • Instantiate and invoke AddDependencyCodeActionProvider inside LSP provideCodeActions middleware and prepend its results.
  • Update the provider’s provideCodeActions signature to return (Command | CodeAction)[] to align with LSP/middleware usage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/extension/providers/add_dependency_code_action_provider.ts Adjusts provider API typing to support being invoked from middleware.
src/extension/extension.ts Removes delayed provider registration logic previously used to influence ordering.
src/extension/analysis/analyzer.ts Adds middleware stitching to insert custom “Add dependency” fixes at the top of LSP code actions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

devin-ai-integration[bot]

@DanTup

@DanTup

@DanTup

DanTup deleted the move-add-dep-fix-to-middleware branch

May 26, 2026 10:46

Read the original on github.com ↗