Merge pull request #3637 from continuedev/pe/quick-fix-config

feat(VSC): give option to disable quick fix
This commit is contained in:
Patrick Erichsen 2025-01-07 17:36:15 -06:00 • committed by GitHub
commit a520f008e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View file

@ -101,6 +101,11 @@
"default": true,
"description": "Show inline suggestion to use the Continue keyboard shortcuts (e.g. \"Cmd/Ctrl L to select code, Cmd/Ctrl I to edit\")."
},
"continue.disableQuickFix": {
"type": "boolean",
"default": false,
"description": "Disable the quick fix feature."
},
"continue.enableQuickActions": {
"type": "boolean",
"default": false,

View file

@ -1,3 +1,4 @@
import { EXTENSION_NAME } from "core/control-plane/env";
import * as vscode from "vscode";
class ContinueQuickFixProvider implements vscode.CodeActionProvider {
@ -42,6 +43,15 @@ class ContinueQuickFixProvider implements vscode.CodeActionProvider {
}
export default function registerQuickFixProvider() {
const isDisabled =
!!vscode.workspace
.getConfiguration(EXTENSION_NAME)
.get<boolean>("disableQuickFix") === true;
if (isDisabled) {
return;
}
// In your extension's activate function:
vscode.languages.registerCodeActionsProvider(
{ language: "*" },