@@ -1011,21 +1011,12 @@ where
10111011
10121012 async fn tool_use_execute ( & mut self , tool_uses : Vec < QueuedTool > ) -> Result < ChatState , ChatError > {
10131013 // Execute the requested tools.
1014- let terminal_width = self . terminal_width ( ) ;
10151014 let mut tool_results = vec ! [ ] ;
10161015 for tool in tool_uses {
10171016 let mut tool_telemetry = self . tool_use_telemetry_events . entry ( tool. 0 . clone ( ) ) ;
10181017 tool_telemetry = tool_telemetry. and_modify ( |ev| ev. is_accepted = true ) ;
10191018
10201019 let tool_start = std:: time:: Instant :: now ( ) ;
1021- queue ! (
1022- self . output,
1023- style:: SetForegroundColor ( Color :: Cyan ) ,
1024- style:: Print ( format!( "\n {}...\n " , tool. 1 . display_name_action( ) ) ) ,
1025- style:: SetForegroundColor ( Color :: DarkGrey ) ,
1026- style:: Print ( format!( "{}\n " , "▔" . repeat( terminal_width) ) ) ,
1027- style:: SetForegroundColor ( Color :: Reset ) ,
1028- ) ?;
10291020 let invoke_result = tool. 1 . invoke ( & self . ctx , & mut self . output ) . await ;
10301021
10311022 if self . interactive && self . spinner . is_some ( ) {
@@ -1047,7 +1038,8 @@ where
10471038 execute ! (
10481039 self . output,
10491040 style:: SetForegroundColor ( Color :: Green ) ,
1050- style:: Print ( format!( "🟢 Completed in {}s" , tool_time) ) ,
1041+ style:: SetAttribute ( Attribute :: Bold ) ,
1042+ style:: Print ( format!( " ● Completed in {}s" , tool_time) ) ,
10511043 style:: SetForegroundColor ( Color :: Reset ) ,
10521044 style:: Print ( "\n " ) ,
10531045 ) ?;
@@ -1434,22 +1426,28 @@ where
14341426 }
14351427
14361428 async fn print_tool_descriptions ( & mut self , tool_uses : & [ QueuedTool ] ) -> Result < ( ) , ChatError > {
1437- let terminal_width = self . terminal_width ( ) ;
1429+ const TOOL_BULLET : & str = " ● " ;
1430+ const CONTINUATION_LINE : & str = " ⋮ " ;
1431+
14381432 for ( _, tool) in tool_uses. iter ( ) {
14391433 queue ! (
14401434 self . output,
1441- style:: SetForegroundColor ( Color :: Cyan ) ,
1442- style:: Print ( format!( "{}\n " , tool. display_name( ) ) ) ,
1443- style:: SetForegroundColor ( Color :: Reset ) ,
1444- style:: SetForegroundColor ( Color :: DarkGrey ) ,
1445- style:: Print ( format!( "{}\n " , "▔" . repeat( terminal_width) ) ) ,
1446- style:: SetForegroundColor ( Color :: Reset ) ,
1435+ style:: SetForegroundColor ( Color :: Blue ) ,
1436+ style:: Print ( format!( "🛠️ using tool: {}\n " , tool. display_name( ) ) ) ,
1437+ style:: SetForegroundColor ( Color :: Reset )
14471438 ) ?;
1439+ queue ! ( self . output, style:: Print ( CONTINUATION_LINE ) ) ?;
1440+ queue ! ( self . output, style:: Print ( "\n " ) ) ?;
1441+ queue ! ( self . output, style:: Print ( TOOL_BULLET ) ) ?;
1442+
14481443 tool. queue_description ( & self . ctx , & mut self . output )
14491444 . await
14501445 . map_err ( |e| ChatError :: Custom ( format ! ( "failed to print tool: {}" , e) . into ( ) ) ) ?;
1446+
14511447 queue ! ( self . output, style:: Print ( "\n " ) ) ?;
1448+ queue ! ( self . output, style:: Print ( CONTINUATION_LINE ) ) ?;
14521449 }
1450+
14531451 Ok ( ( ) )
14541452 }
14551453
0 commit comments