@@ -1346,7 +1346,7 @@ impl ChatSession {
13461346 self . stderr,
13471347 style:: SetForegroundColor ( Color :: Yellow ) ,
13481348 style:: Print (
1349- "⚠️ Checkpoint is disabled while in tangent mode. Disbale tangent mode with: q settings -d chat.enableTangentMode.\n \n "
1349+ "⚠️ Checkpoint is disabled while in tangent mode. Disable tangent mode with: q settings -d chat.enableTangentMode.\n \n "
13501350 ) ,
13511351 style:: SetForegroundColor ( Color :: Reset ) ,
13521352 ) ?;
@@ -2388,7 +2388,7 @@ impl ChatSession {
23882388 execute ! ( self . stdout, style:: Print ( "\n " ) ) ?;
23892389
23902390 // Handle checkpoint after tool execution - store tag for later display
2391- let checkpoint_tag = {
2391+ let checkpoint_tag: Option < String > = {
23922392 let enabled = os
23932393 . database
23942394 . settings
@@ -2400,7 +2400,7 @@ impl ChatSession {
24002400 . get_bool ( Setting :: EnabledTangentMode )
24012401 . unwrap_or ( false ) ;
24022402 if invoke_result. is_err ( ) || !enabled {
2403- String :: new ( )
2403+ None
24042404 }
24052405 // Take manager out temporarily to avoid borrow conflicts
24062406 else if let Some ( mut manager) = self . conversation . checkpoint_manager . take ( ) {
@@ -2442,20 +2442,20 @@ impl ChatSession {
24422442 Some ( tool. name . clone ( ) ) ,
24432443 ) {
24442444 debug ! ( "Failed to create tool checkpoint: {}" , e) ;
2445- String :: new ( )
2445+ None
24462446 } else {
24472447 manager. tools_in_turn += 1 ;
2448- tag
2448+ Some ( tag)
24492449 }
24502450 } else {
2451- String :: new ( )
2451+ None
24522452 } ;
24532453
24542454 // Put manager back
24552455 self . conversation . checkpoint_manager = Some ( manager) ;
24562456 tag
24572457 } else {
2458- String :: new ( )
2458+ None
24592459 }
24602460 } ;
24612461
@@ -2502,8 +2502,15 @@ impl ChatSession {
25022502 style:: Print ( format!( " ● Completed in {}s" , tool_time) ) ,
25032503 style:: SetForegroundColor ( Color :: Reset ) ,
25042504 ) ?;
2505- if !checkpoint_tag. is_empty ( ) {
2506- execute ! ( self . stdout, style:: Print ( format!( " [{checkpoint_tag}]" ) . blue( ) . bold( ) ) ) ?;
2505+ if let Some ( tag) = checkpoint_tag {
2506+ execute ! (
2507+ self . stdout,
2508+ style:: SetForegroundColor ( Color :: Blue ) ,
2509+ style:: SetAttribute ( Attribute :: Bold ) ,
2510+ style:: Print ( format!( " [{tag}]" ) ) ,
2511+ style:: SetForegroundColor ( Color :: Reset ) ,
2512+ style:: SetAttribute ( Attribute :: Reset ) ,
2513+ ) ?;
25072514 }
25082515 execute ! ( self . stdout, style:: Print ( "\n \n " ) ) ?;
25092516
0 commit comments