File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
crates/chat-cli/src/cli/chat Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -2362,6 +2362,21 @@ impl ChatContext {
23622362 ) ;
23632363 } ) ;
23642364
2365+ let loading = self . conversation_state . tool_manager . pending_clients ( ) . await ;
2366+ if !loading. is_empty ( ) {
2367+ queue ! (
2368+ self . output,
2369+ style:: SetAttribute ( Attribute :: Bold ) ,
2370+ style:: Print ( "Servers still loading" ) ,
2371+ style:: SetAttribute ( Attribute :: Reset ) ,
2372+ style:: Print ( "\n " ) ,
2373+ style:: Print ( "▔" . repeat( terminal_width) ) ,
2374+ ) ?;
2375+ for client in loading {
2376+ queue ! ( self . output, style:: Print ( format!( " - {client}" ) ) , style:: Print ( "\n " ) ) ?;
2377+ }
2378+ }
2379+
23652380 queue ! (
23662381 self . output,
23672382 style:: Print ( "\n Trusted tools can be run without confirmation\n " ) ,
Original file line number Diff line number Diff line change @@ -256,6 +256,10 @@ impl ToolManagerBuilder {
256256
257257 // Send up task to update user on server loading status
258258 let ( tx, rx) = std:: sync:: mpsc:: channel :: < LoadingMsg > ( ) ;
259+ // TODO: rather than using it as an "anchor" to determine the progress of server loads, we
260+ // should make this task optional (and it is defined as an optional right now. There is
261+ // just no code path with it being None). When ran with no-interactive mode, we really do
262+ // not have a need to run this task.
259263 let loading_display_task = tokio:: task:: spawn_blocking ( move || {
260264 let mut loading_servers = HashMap :: < String , StatusLine > :: new ( ) ;
261265 let mut spinner_logo_idx: usize = 0 ;
@@ -1080,7 +1084,7 @@ impl ToolManager {
10801084 Ok ( ( ) )
10811085 }
10821086
1083- pub async fn _pending_clients ( & self ) -> Vec < String > {
1087+ pub async fn pending_clients ( & self ) -> Vec < String > {
10841088 self . pending_clients . read ( ) . await . iter ( ) . cloned ( ) . collect :: < Vec < _ > > ( )
10851089 }
10861090}
You can’t perform that action at this time.
0 commit comments