-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vscode): adding inline edit into quick fix bar (#3010)
* feat(vscode): adding inline edit into quick fix bar asd * to: change the kind and name for inline edit
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { | ||
CancellationToken, | ||
CodeAction, | ||
CodeActionContext, | ||
CodeActionKind, | ||
CodeActionProvider, | ||
Range, | ||
Selection, | ||
TextDocument, | ||
} from "vscode"; | ||
|
||
export class InlineEditCodeActionProvider implements CodeActionProvider { | ||
provideCodeActions( | ||
_document: TextDocument, | ||
_range: Range | Selection, | ||
_context: CodeActionContext, | ||
token: CancellationToken, | ||
): CodeAction[] | undefined { | ||
if (token.isCancellationRequested) { | ||
return; | ||
} | ||
const quickFix = new CodeAction("Edit with Tabby", CodeActionKind.RefactorRewrite); | ||
|
||
quickFix.command = { | ||
command: "tabby.chat.edit.start", | ||
title: "Start Tabby Chat Edit", | ||
}; | ||
|
||
return [quickFix]; | ||
} | ||
} |
This file contains 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
This file contains 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