fix: 🐛 stop streaming on rejection
This commit is contained in:
parent
48d4e0918b
commit
9fc831e758
3 changed files with 17 additions and 5 deletions
4
extension/package-lock.json
generated
4
extension/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.0.116",
|
||||
"version": "0.0.118",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.0.116",
|
||||
"version": "0.0.118",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"displayName": "Continue",
|
||||
"pricing": "Free",
|
||||
"description": "The open-source coding autopilot",
|
||||
"version": "0.0.116",
|
||||
"version": "0.0.118",
|
||||
"publisher": "Continue",
|
||||
"engines": {
|
||||
"vscode": "^1.67.0"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,12 @@ class DiffManager {
|
|||
originalFilepath: string,
|
||||
newFilepath: string,
|
||||
newContent: string
|
||||
): vscode.TextEditor {
|
||||
): vscode.TextEditor | undefined {
|
||||
// If the file doesn't yet exist, don't open the diff editor
|
||||
if (!fs.existsSync(newFilepath)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const rightUri = vscode.Uri.parse(newFilepath);
|
||||
const leftUri = vscode.Uri.file(originalFilepath);
|
||||
const title = "Continue Diff";
|
||||
|
|
@ -73,6 +78,12 @@ class DiffManager {
|
|||
originalFilepath,
|
||||
newFilepath,
|
||||
};
|
||||
this.diffs.set(newFilepath, diffInfo);
|
||||
}
|
||||
|
||||
// Open the editor if it hasn't been opened yet
|
||||
const diffInfo = this.diffs.get(newFilepath);
|
||||
if (diffInfo && !diffInfo?.editor) {
|
||||
diffInfo.editor = this.openDiffEditor(
|
||||
originalFilepath,
|
||||
newFilepath,
|
||||
|
|
@ -80,6 +91,7 @@ class DiffManager {
|
|||
);
|
||||
this.diffs.set(newFilepath, diffInfo);
|
||||
}
|
||||
|
||||
return newFilepath;
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +101,7 @@ class DiffManager {
|
|||
vscode.window.showTextDocument(diffInfo.editor.document);
|
||||
vscode.commands.executeCommand("workbench.action.closeActiveEditor");
|
||||
}
|
||||
this.diffs.delete(diffInfo.newFilepath);
|
||||
// this.diffs.delete(diffInfo.newFilepath);
|
||||
fs.unlinkSync(diffInfo.newFilepath);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue