File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
crates/chat-cli/src/cli/chat Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -747,20 +747,17 @@ impl ToolManager {
747747 } ;
748748 Box :: pin ( fut)
749749 } ,
750- None => {
751- let fut = async { future:: pending :: < ( ) > ( ) . await } ;
752- Box :: pin ( fut)
753- } ,
750+ None => Box :: pin ( future:: pending ( ) ) ,
754751 } ;
755- // TODO: make this timeout configurable
756- let timeout_fut: Pin < Box < dyn Future < Output = ( ) > > > = if self . is_interactive {
752+ let timeout_fut: Pin < Box < dyn Future < Output = ( ) > > > = if self . clients . is_empty ( ) {
753+ // If there is no server loaded, we want to resolve immediately
754+ Box :: pin ( future:: ready ( ( ) ) )
755+ } else if self . is_interactive {
757756 let init_timeout = crate :: settings:: settings:: get_int ( "mcp.initTimeout" )
758757 . map_or ( 5000_u64 , |s| s. map_or ( 5000_u64 , |n| n as u64 ) ) ;
759- error ! ( "## timeout: {init_timeout}" ) ;
760758 Box :: pin ( tokio:: time:: sleep ( std:: time:: Duration :: from_millis ( init_timeout) ) )
761759 } else {
762- let fut = async { future:: pending :: < ( ) > ( ) . await } ;
763- Box :: pin ( fut)
760+ Box :: pin ( future:: pending ( ) )
764761 } ;
765762 tokio:: select! {
766763 _ = display_fut => { } ,
You can’t perform that action at this time.
0 commit comments