Skip to content

Commit d297b30

Browse files
committed
only surfaces timeout warning in non-interactive mode with one or more server in the client list
1 parent 30b1d08 commit d297b30

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

crates/chat-cli/src/cli/chat/tool_manager.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -858,13 +858,15 @@ impl ToolManager {
858858
let still_loading = self.pending_clients.read().await.iter().cloned().collect::<Vec<_>>();
859859
let _ = tx.send(LoadingMsg::Terminate { still_loading }).await;
860860
}
861-
let _ = queue!(
862-
output,
863-
style::Print(
864-
"Not all mcp servers loaded. Configure no-interactive timeout with q settings mcp.noInteractiveTimeout"
865-
),
866-
style::Print("\n------\n")
867-
);
861+
if !self.clients.is_empty() {
862+
let _ = queue!(
863+
output,
864+
style::Print(
865+
"Not all mcp servers loaded. Configure no-interactive timeout with q settings mcp.noInteractiveTimeout"
866+
),
867+
style::Print("\n------\n")
868+
);
869+
}
868870
},
869871
_ = server_loading_fut => {
870872
if let Some(tx) = tx {

0 commit comments

Comments
 (0)