✨ cmd/ctrl+z to reject quick edit diff
This commit is contained in:
parent
e0fade5c6b
commit
e8a20e1590
3 changed files with 20 additions and 16 deletions
|
|
@ -198,6 +198,12 @@
|
|||
"mac": "shift+cmd+backspace",
|
||||
"key": "shift+ctrl+backspace"
|
||||
},
|
||||
{
|
||||
"command": "continue.rejectDiff",
|
||||
"mac": "cmd+z",
|
||||
"key": "ctrl+z",
|
||||
"when": "continue.streamingDiff"
|
||||
},
|
||||
{
|
||||
"command": "continue.quickEdit",
|
||||
"mac": "cmd+shift+l",
|
||||
|
|
|
|||
|
|
@ -175,6 +175,11 @@ export class VerticalPerLineDiffHandler {
|
|||
}
|
||||
|
||||
clear(accept: boolean) {
|
||||
vscode.commands.executeCommand(
|
||||
"setContext",
|
||||
"continue.streamingDiff",
|
||||
false
|
||||
);
|
||||
const rangesToDelete = accept
|
||||
? this.redDecorationManager.getRanges()
|
||||
: this.greenDecorationManager.getRanges();
|
||||
|
|
|
|||
|
|
@ -131,22 +131,15 @@ export async function streamEdit(input: string) {
|
|||
}
|
||||
input = `Original request: ${existingHandler.input}\nUpdated request: ${input}`;
|
||||
}
|
||||
try {
|
||||
await diffHandler.run(
|
||||
streamDiffLines(
|
||||
rangeContent,
|
||||
llm,
|
||||
input,
|
||||
getMarkdownLanguageTagForFile(filepath)
|
||||
)
|
||||
);
|
||||
} finally {
|
||||
vscode.commands.executeCommand(
|
||||
"setContext",
|
||||
"continue.streamingDiff",
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
await diffHandler.run(
|
||||
streamDiffLines(
|
||||
rangeContent,
|
||||
llm,
|
||||
input,
|
||||
getMarkdownLanguageTagForFile(filepath)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export interface VerticalDiffCodeLens {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue