Skip to content

fix(vscode): stop code action providers from interfering with quick fixes - #9330

Closed
markijbema wants to merge 4 commits into
mainfrom
fix/quickfix-code-action-interference
Closed

fix(vscode): stop code action providers from interfering with quick fixes#9330
markijbema wants to merge 4 commits into
mainfrom
fix/quickfix-code-action-interference

Conversation

@markijbema

Copy link
Copy Markdown
Contributor

Summary

  • Gate AutocompleteCodeActionProvider behind the enableSmartInlineTaskKeybinding setting so it stops injecting a "Suggested Edits" QuickFix into every Ctrl+. / Cmd+. menu when autocomplete is disabled
  • Remove isPreferred from "Fix with Kilo Code" code action so it doesn't hijack VS Code's auto-fix over language server fixes that provide actual code edits

Context

This is a follow-up to #8508 which fixed the keybinding conflict (the cycleAgentMode command was globally bound to Ctrl+./Cmd+. without a when clause). That fix addressed the primary breakage, but two code action provider issues remained:

  1. AutocompleteCodeActionProvider was registered with "*" document selector and unconditionally returned a QuickFix action on every provideCodeActions call — regardless of whether autocomplete was enabled, adding noise to every quick fix menu
  2. KiloCodeActionProvider marked "Fix with Kilo Code" as isPreferred: true, which caused it to be selected by editor.action.autoFix over language server fixes that provide actual inline code edits (Kilo's action opens a chat, not a direct fix)

Closes #8522

Test plan

  • Existing unit tests updated and passing (bun test tests/unit/code-action-provider.test.ts — 13 pass)
  • With autocomplete disabled: Ctrl+. menu no longer shows "Kilo Code: Suggested Edits"
  • With autocomplete enabled: "Kilo Code: Suggested Edits" still appears as before
  • editor.action.autoFix no longer selects "Fix with Kilo Code" over actual language server fixes

…ixes

AutocompleteCodeActionProvider unconditionally injected a QuickFix into
every Ctrl+. menu regardless of whether autocomplete was enabled, adding
noise to the quick fix list. Gate it behind the enableSmartInlineTaskKeybinding
setting so it only appears when autocomplete shortcuts are active.

KiloCodeActionProvider marked "Fix with Kilo Code" as isPreferred, which
caused it to hijack VS Code's auto-fix behavior over language server fixes
that provide actual code edits. Remove the preferred flag so language
server fixes take priority.

Closes #8522
@kilo-code-bot

kilo-code-bot Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts 19 Previous issue still present: the wrapper exports for countLines, shouldShowOnlyFirstLine, and getFirstLine were removed, but packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/__tests__/AutocompleteInlineCompletionProvider.test.ts still imports those names from this module.
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/__tests__/AutocompleteInlineCompletionProvider.test.ts 7 This unchanged test imports helpers from AutocompleteInlineCompletionProvider, but the PR removes those named exports. Update the test/import path or keep the exports.
Files Reviewed (1 changed file, 7 total carried forward)
  • packages/opencode/test/mcp/oauth-browser.test.ts - 0 issues
  • packages/kilo-vscode/src/services/autocomplete/AutocompleteCodeActionProvider.ts - 0 issues (carried forward)
  • packages/kilo-vscode/src/services/autocomplete/AutocompleteServiceManager.ts - 0 issues (carried forward)
  • packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts - 1 issue (carried forward)
  • packages/kilo-vscode/src/services/code-actions/code-action-provider.ts - 0 issues (carried forward)
  • packages/kilo-vscode/tests/unit/code-action-provider.test.ts - 0 issues (carried forward)
  • packages/opencode/test/session/prompt.test.ts - 0 issues (carried forward)

Fix these issues in Kilo Cloud


Reviewed by gpt-5.5-20260423 · 707,896 tokens

@markijbema markijbema removed their assignment May 4, 2026
@markijbema markijbema self-assigned this May 5, 2026
@markijbema markijbema closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quick fixes (Ctrl+. / Cmd+.) broken by code action provider interference

1 participant