From 0131ffdc2a32c8d17727675c573d1063b208557a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E7=8E=AE=20=28Jade=20Lin=29?= Date: Tue, 17 Mar 2026 21:38:49 +0800 Subject: [PATCH] fix(tui): keep chat processing during combo prompt --- crates/coco-tui/src/components/chat.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/crates/coco-tui/src/components/chat.rs b/crates/coco-tui/src/components/chat.rs index 8988ab0..657a3a3 100644 --- a/crates/coco-tui/src/components/chat.rs +++ b/crates/coco-tui/src/components/chat.rs @@ -588,7 +588,7 @@ impl Chat<'static> { self.set_pending_combo_feedback_action(id.clone()); } self.set_combo_thinking_active(thinking.as_ref().is_some_and(|cfg| cfg.enabled)); - self.set_ready(); + self.set_processing(); } ComboEvent::ReplyToolUse { offload: false, .. } => { self.set_combo_thinking_active(false); @@ -4268,6 +4268,20 @@ mod tests { assert_eq!(chat.messages.selected_idx(), Some(idx_b)); } + #[test] + fn combo_prompt_keeps_chat_processing_for_non_interactive_reply() { + let mut chat = Chat::new(Config::default()); + chat.handle_combo_event(&ComboEvent::Prompt { + id: "combo-1".to_string(), + name: "demo".to_string(), + prompt: "need feedback".to_string(), + thinking: None, + session_sock: Some("/tmp/combo.sock".to_string()), + }); + + assert!(matches!(chat.state.state, ChatState::Processing)); + } + #[test] fn truncate_with_suffix_appends_marker() { let text = "a".repeat(200);