File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -620,6 +620,9 @@ impl App {
620620 agent_mutex. lock ( ) . await . cancel ( ) ;
621621 }
622622 self . chat . finish_turn ( & mut self . terminal ) ;
623+ if let Err ( e) = self . chat . transcript . save ( ) {
624+ tracing:: error!( "Failed to save transcript on cancel: {}" , e) ;
625+ }
623626 self . input_mode = InputMode :: Normal ;
624627 Ok ( ( ) )
625628 }
@@ -812,6 +815,9 @@ impl App {
812815 } ,
813816 AgentStep :: Error ( msg) => {
814817 self . chat . transcript . mark_active_block ( Status :: Error ) ;
818+ if let Err ( e) = self . chat . transcript . save ( ) {
819+ tracing:: error!( "Failed to save transcript on error: {}" , e) ;
820+ }
815821 self . input_mode = InputMode :: Normal ;
816822
817823 let alert_msg = if let Some ( start) = msg. find ( '{' ) {
@@ -904,7 +910,10 @@ impl App {
904910 self . decide_pending_tool ( decision) . await ;
905911 } ,
906912 None => {
907- // Ask user for approval
913+ // Ask user for approval - save transcript checkpoint while waiting
914+ if let Err ( e) = self . chat . transcript . save ( ) {
915+ tracing:: error!( "Failed to save transcript before tool approval: {}" , e) ;
916+ }
908917 self . input_mode = InputMode :: ToolApproval ;
909918 } ,
910919 }
You can’t perform that action at this time.
0 commit comments