File tree Expand file tree Collapse file tree
packages/vscode/src/views/panel/backend Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { LAST_APPLIED_CHANGES_STATE_KEY } from '@/constants/state-keys'
55import { get_git_repository } from '@/utils/git-repository-utils'
66import { dictionary } from '@shared/constants/dictionary'
77import { PanelProvider } from '@/views/panel/backend/panel-provider'
8+ import { create_checkpoint } from '@/commands/checkpoints-command/actions'
89
910export const handle_accept_commit_message = async (
1011 panel_provider : PanelProvider ,
@@ -25,6 +26,15 @@ export const handle_accept_commit_message = async (
2526 panel_provider . set_undo_button_state ( false )
2627
2728 await repository . status ( )
29+
30+ const title = 'Committed changes'
31+ const description = commit_message
32+ await create_checkpoint (
33+ panel_provider . workspace_provider ,
34+ panel_provider . context ,
35+ title ,
36+ description
37+ )
2838 } catch ( commit_error ) {
2939 Logger . error ( {
3040 function_name : 'handle_accept_commit_message' ,
Original file line number Diff line number Diff line change @@ -89,7 +89,6 @@ import { Logger } from '@shared/utils/logger'
8989import { CancelTokenSource } from 'axios'
9090import { update_last_used_preset_or_group } from './message-handlers/update-last-used-preset-or-group'
9191import { undo_files } from '@/commands/apply-chat-response-command/utils/file-operations'
92- import { create_checkpoint } from '@/commands/checkpoints-command/actions'
9392import { dictionary } from '@shared/constants/dictionary'
9493
9594export class PanelProvider implements vscode . WebviewViewProvider {
@@ -547,16 +546,6 @@ export class PanelProvider implements vscode.WebviewViewProvider {
547546 await handle_proceed_with_commit ( this , message . files_to_stage )
548547 } else if ( message . command == 'ACCEPT_COMMIT_MESSAGE' ) {
549548 await handle_accept_commit_message ( this , message . commit_message )
550-
551- const title = 'Committed changes'
552- const description = message . commit_message
553-
554- await create_checkpoint (
555- this . workspace_provider ,
556- this . context ,
557- title ,
558- description
559- )
560549 } else if ( message . command == 'CANCEL_COMMIT_MESSAGE' ) {
561550 await handle_cancel_commit_message ( this )
562551 } else if ( message . command == 'MANAGE_CONFIGURATIONS' ) {
You can’t perform that action at this time.
0 commit comments