Skip to content

Commit 8821635

Browse files
committed
Return actual changes accepted result from apply_response
- only applying 'response preview' should dispose terminal - rejecting not └── apps └── editor ├── package.json └── src ├── commands │ ├── apply-from-clipboard-command.ts │ ├── apply-from-terminal-command.ts │ ├── generate-commit-message-commands │ │ └── actions │ │ └── run-generate-action.ts │ ├── history-command │ │ ├── actions │ │ │ └── restore-checkpoint.ts │ │ └── history-command.ts │ └── index.ts ├── extension.ts ├── features │ ├── apply-response │ │ ├── apply-response.ts │ │ └── utils │ │ ├── preview │ │ │ ├── preview.ts │ │ │ └── vscode-ui.ts │ │ └── preview-handler.ts │ └── checkpoints │ └── actions │ └── create-checkpoint.ts ├── services │ └── websocket-manager.ts └── views └── prompt ├── backend │ ├── message-handlers │ │ ├── handle-apply-response-from-history.ts │ │ ├── handle-discard-user-changes-in-preview.ts │ │ ├── handle-focus-on-file-in-preview.ts │ │ ├── handle-invoke-agentic-cli.ts │ │ ├── handle-make-api-call.ts │ │ ├── handle-patch-repair.ts │ │ ├── handle-request-can-undo.ts │ │ ├── handle-response-preview.ts │ │ ├── handle-toggle-file-in-preview.ts │ │ └── handle-undo.ts │ └── prompt-view-provider.ts ├── frontend │ └── Prompt.tsx └── types └── messages.ts
1 parent 921115c commit 8821635

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/editor/src/features/apply-response/apply-response.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const setup_apply_response = (params: {
6868
let response_items: ReturnType<typeof parse_response> = []
6969
let is_intelligent_file_search_results = false
7070
let is_code_at_cursor = false
71+
let changes_accepted_result = true
7172

7273
try {
7374
if (!vscode.workspace.workspaceFolders?.length) {
@@ -441,6 +442,8 @@ export const setup_apply_response = (params: {
441442
} else if (saved_tab_groups) {
442443
await restore_tab_groups(saved_tab_groups)
443444
}
445+
446+
changes_accepted_result = changes_accepted
444447
}
445448
} catch (err: any) {
446449
params.prompt_view_provider.send_message({
@@ -468,7 +471,7 @@ export const setup_apply_response = (params: {
468471
}
469472
}
470473

471-
return true
474+
return changes_accepted_result
472475
}
473476
}
474477

0 commit comments

Comments
 (0)