File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/commands/checkpoint_agent Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -532,12 +532,11 @@ impl AgentCheckpointPreset for GithubCopilotPreset {
532532 . map_err ( |e| GitAiError :: PresetError ( format ! ( "Invalid JSON in hook_input: {}" , e) ) ) ?;
533533
534534 // Extract hook_event_name to determine checkpoint type
535+ // Fallback to "after_edit" if not set (for older versions of the VS Code extension)
535536 let hook_event_name = hook_data
536537 . get ( "hook_event_name" )
537538 . and_then ( |v| v. as_str ( ) )
538- . ok_or_else ( || {
539- GitAiError :: PresetError ( "hook_event_name not found in hook_input" . to_string ( ) )
540- } ) ?;
539+ . unwrap_or ( "after_edit" ) ;
541540
542541 // Validate hook_event_name
543542 if hook_event_name != "before_edit" && hook_event_name != "after_edit" {
You can’t perform that action at this time.
0 commit comments