Skip to content

Commit 7a636e9

Browse files
committed
Refactor the tab group restoration logic to only restore saved tabs when the response preview is explicitly rejected, preventing restoration if changes are accepted
1 parent 74108bd commit 7a636e9

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎packages/vscode/src/commands/apply-chat-response-command/apply-chat-response-command.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,8 @@ export const apply_chat_response_command = (params: {
312312
}
313313

314314
before_checkpoint = undefined
315-
}
316-
317-
// Restore tab groups after preview ends
318-
if (saved_tab_groups) {
315+
} else if (saved_tab_groups) {
316+
// Restore tab groups when preview gets rejected
319317
await restore_tab_groups(saved_tab_groups)
320318
}
321319
}

0 commit comments

Comments
 (0)