Skip to content

Commit a21cf57

Browse files
committed
Update the response review discard handler to remove only the selected history item instead of clearing all history
1 parent c838b1b commit a21cf57

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • packages/vscode/src/views/panel/frontend

‎packages/vscode/src/views/panel/frontend/Panel.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,11 @@ export const Panel = () => {
257257
raw_instructions={raw_instructions}
258258
has_multiple_workspaces={workspace_folder_count > 1}
259259
on_discard={() => {
260-
set_response_history([])
260+
set_response_history((prev) =>
261+
prev.filter(
262+
(i) => i.created_at != selected_history_item_created_at
263+
)
264+
)
261265
set_selected_history_item_created_at(undefined)
262266
post_message(vscode, { command: 'EDITS_REVIEW', files: [] })
263267
}}

0 commit comments

Comments
 (0)