linter-integrated ai code fix suggestion via lightbulb menu
Intercepts diagnostic problems reported by VS Code's built-in linters, language servers, and third-party tools (ESLint, SonarLint, TypeScript), then augments the native lightbulb Quick Fix UI with AI-generated code solutions. When a user clicks the lightbulb on a flagged problem, the extension extracts code context (function boundaries via language server or ±10 lines fallback), sends the problem description and code to OpenAI's API, and returns a fixed code snippet for one-click application.
Unique: Integrates directly into VS Code's native lightbulb Quick Fix UI rather than requiring a separate sidebar or command palette, leveraging the editor's existing diagnostic system and language server infrastructure to extract context. This makes AI fixes feel native to the editor workflow without UI context switching.
vs alternatives: Faster workflow than Copilot Chat or standalone AI tools because fixes are one-click from the lightbulb menu without opening a separate panel; tighter integration with existing linters means no duplicate problem detection.
language-aware code context extraction with fallback
Automatically detects the programming language of the current file and uses VS Code's language server APIs to extract function boundaries and scope context around a flagged problem. For languages without language server support, falls back to a fixed-range context window (±10 lines around the problem). This context is then sent to the AI model to ensure fixes are semantically aware of the surrounding code structure.
Unique: Uses VS Code's language server protocol (LSP) to extract function-level context rather than regex or AST parsing, ensuring compatibility with any language that has an LSP implementation. Falls back gracefully to fixed-range context for unsupported languages, maintaining usability across the entire VS Code ecosystem.
vs alternatives: More accurate context extraction than regex-based tools because it leverages the editor's own semantic understanding via language servers; more portable than tools that require language-specific AST parsers.
openai api integration with configurable model selection
Sends extracted code context and linter problem descriptions to OpenAI's API, supporting both GPT-4 and GPT-3.5-turbo models. The extension constructs a prompt using customizable system instructions and problem/code prefixes/suffixes, then parses the API response to extract the fixed code. Model selection is user-configurable via VS Code settings without requiring extension reload, allowing runtime switching between models based on cost/quality tradeoffs.
Unique: Exposes all prompt components (system prompt, problem prefix, code prefix/suffix) as user-editable VS Code settings, enabling fine-grained prompt engineering without modifying extension code. This allows teams to customize AI behavior for domain-specific coding standards or to work around GPT-3.5-turbo formatting issues.
vs alternatives: More customizable than Copilot (which uses fixed prompts) because every part of the AI request is user-configurable; more transparent than closed-box AI tools because users can inspect and modify the exact prompts being sent to the API.
response parsing and code extraction from ai output
Processes OpenAI API responses to extract the fixed code snippet, with special handling for GPT-3.5-turbo which frequently includes extraneous commentary, markdown formatting, or explanatory text. The extension attempts to strip non-code content using heuristics (e.g., removing markdown code fences, filtering explanatory text) before returning the cleaned code for editor insertion. Parsing logic is influenced by customizable `problemCodeSuffix` settings to help the AI format responses correctly.
Unique: Implements heuristic-based response parsing with user-configurable prompt suffixes to guide AI formatting, rather than relying on strict structured output formats. This allows the extension to work with GPT-3.5-turbo's verbose responses while remaining flexible for future model changes.
vs alternatives: More robust than naive string extraction because it handles markdown code fences and common commentary patterns; more flexible than tools requiring strict JSON schemas because it adapts to different AI response styles via prompt tuning.
one-click code fix application with inline editor integration
Applies the AI-generated fixed code directly to the editor by replacing the problem range or function with the suggested code. The fix is applied as a single editor edit operation, maintaining undo/redo history and triggering any configured linters/formatters on the modified code. Users confirm the fix via the lightbulb menu or Quick Fix button; no additional dialogs or confirmations are required.
Unique: Integrates directly with VS Code's editor API to apply fixes as native edit operations, ensuring fixes participate in the editor's undo/redo system and trigger configured formatters. This makes AI fixes feel like native editor operations rather than external tool outputs.
vs alternatives: Faster workflow than copy-pasting from a separate AI tool because fixes are applied with a single click; better integration than tools that open new files or dialogs because fixes are applied inline with full editor history support.
multi-linter problem aggregation and fix suggestion
Listens to diagnostic events from multiple linters and language servers (ESLint, TypeScript, SonarLint, etc.) and augments each reported problem with an AI-generated fix suggestion. The extension does not prioritize or filter problems; it offers AI fixes for any diagnostic reported by any active linter, allowing users to fix issues from multiple tools in a unified workflow.
Unique: Hooks into VS Code's diagnostic system to augment problems from any linter without requiring linter-specific integrations. This makes the extension compatible with any linter that reports to VS Code's diagnostic API, including future linters, without code changes.
vs alternatives: More flexible than linter-specific tools because it works with any linter that integrates with VS Code; more unified than running separate AI tools for each linter because all fixes appear in the same lightbulb menu.
configurable prompt engineering via vs code settings
Exposes all components of the AI prompt as user-editable VS Code settings, including the system prompt, problem description prefix, code context prefix, and code context suffix. This allows users to customize how problems and code are presented to the AI model without modifying extension code, enabling fine-tuning for specific coding standards, languages, or to work around model-specific quirks (e.g., GPT-3.5-turbo formatting issues).
Unique: Exposes all prompt components as individual VS Code settings rather than a single monolithic prompt, allowing granular control over how problems and code are presented to the AI. This enables users to tune specific aspects (e.g., just the code suffix) without rewriting the entire prompt.
vs alternatives: More flexible than tools with fixed prompts because every part of the AI request is customizable; more accessible than tools requiring code modification because customization is done via VS Code settings UI.
keyboard shortcut support for quick fix preview and application
Provides keyboard shortcuts for invoking and previewing AI-generated fixes without using the mouse. The standard VS Code Quick Fix shortcut (typically `Ctrl+.` or `Cmd+.`) opens the lightbulb menu, and an extension-specific shortcut (`Ctrl+Enter` or `Cmd+Enter`) is available for preview functionality. This enables power users to apply fixes entirely via keyboard without touching the mouse.
Unique: Integrates with VS Code's standard Quick Fix shortcut (`Ctrl+.`) while adding an extension-specific preview shortcut (`Ctrl+Enter`), allowing keyboard-driven fix application without requiring custom keybinding configuration.
vs alternatives: More accessible than mouse-only tools because fixes can be applied entirely via keyboard; more integrated than external tools because it uses VS Code's native shortcut system.
+1 more capabilities