From b2a72c30379be2f737c87bf41c9c24bb8f9530e7 Mon Sep 17 00:00:00 2001 From: Blushyes Date: Fri, 22 Aug 2025 04:22:25 +0800 Subject: [PATCH 1/3] remove timeout --- cli/src/interactive/task_executor.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cli/src/interactive/task_executor.rs b/cli/src/interactive/task_executor.rs index 93d1c68..4a98aa6 100644 --- a/cli/src/interactive/task_executor.rs +++ b/cli/src/interactive/task_executor.rs @@ -162,10 +162,7 @@ pub async fn execute_agent_task_with_context( Ok(()) }; - // Add timeout to prevent hanging - let timeout_future = tokio::time::sleep(tokio::time::Duration::from_secs(300)); // 5 minutes timeout - - // Race between task execution, interruption, and timeout + // Race between task execution and interruption tokio::select! { result = task_future => { result?; @@ -173,10 +170,6 @@ pub async fn execute_agent_task_with_context( interrupt_result = interrupt_future => { interrupt_result?; } - _ = timeout_future => { - tracing::error!("Task execution timed out after 5 minutes"); - return Err(anyhow::anyhow!("Task execution timed out")); - } } Ok(()) From 7be8de32b6d0a7a7971f4fccc2e3186e61b0d7e6 Mon Sep 17 00:00:00 2001 From: Blushyes Date: Fri, 22 Aug 2025 04:23:02 +0800 Subject: [PATCH 2/3] fix the issue where historical messages are still triggered when the @ mention list is present. --- .../interactive/components/input_section.rs | 28 ++++++++++++++++--- cli/src/interactive/input_history.rs | 10 +++---- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/cli/src/interactive/components/input_section.rs b/cli/src/interactive/components/input_section.rs index 1f3a810..176ee9c 100644 --- a/cli/src/interactive/components/input_section.rs +++ b/cli/src/interactive/components/input_section.rs @@ -141,6 +141,7 @@ pub struct EnhancedTextInputProps { pub on_change: Handler<'static, String>, pub on_submit: Handler<'static, String>, pub on_cursor_position_change: Handler<'static, (usize, usize)>, // (line, column) + pub on_file_list_state_change: Handler<'static, bool>, // Track file list visibility pub width: u16, pub placeholder: String, pub color: Option, @@ -156,6 +157,7 @@ impl Default for EnhancedTextInputProps { on_change: Handler::default(), on_submit: Handler::default(), on_cursor_position_change: Handler::default(), + on_file_list_state_change: Handler::default(), width: 80, placeholder: String::new(), color: None, @@ -199,6 +201,7 @@ pub fn EnhancedTextInput( let mut on_change = props.on_change.take(); let mut on_submit = props.on_submit.take(); let mut on_cursor_position_change = props.on_cursor_position_change.take(); + let mut on_file_list_state_change = props.on_file_list_state_change.take(); let mut value = props.value.clone(); let mut cursor_pos = cursor_pos; let mut show_file_list = show_file_list; @@ -269,6 +272,7 @@ pub fn EnhancedTextInput( if recent_text && matches!(code, KeyCode::Enter) { // Close popup and let the general handler below process Enter as newline show_file_list.set(false); + on_file_list_state_change(false); // fallthrough to general handling by not returning } else { // Insert selected file @@ -304,11 +308,13 @@ pub fn EnhancedTextInput( } } show_file_list.set(false); + on_file_list_state_change(false); return; } } KeyCode::Esc => { show_file_list.set(false); + on_file_list_state_change(false); return; } _ => {} @@ -375,12 +381,14 @@ pub fn EnhancedTextInput( selected_file_index.set(0); current_query.set(query); show_file_list.set(true); + on_file_list_state_change(true); } } } } else { // Should not show list, hide it show_file_list.set(false); + on_file_list_state_change(false); } } KeyCode::Backspace => { @@ -451,12 +459,14 @@ pub fn EnhancedTextInput( selected_file_index.set(0); current_query.set(query); show_file_list.set(true); + on_file_list_state_change(true); } } } } else { // Should not show list, hide it show_file_list.set(false); + on_file_list_state_change(false); } } } @@ -524,6 +534,7 @@ pub fn EnhancedTextInput( } else { // No valid query found, hide the list show_file_list.set(false); + on_file_list_state_change(false); } } } @@ -1083,6 +1094,9 @@ pub fn InputSection(mut hooks: Hooks, props: &InputSectionProps) -> impl Into impl Into { - // Navigate to previous history entry - if !*is_task_running.read() { + // Navigate to previous history entry only if file list is not showing + if !*is_task_running.read() && !*file_list_visible.read() { let current_input = input_value.read().clone(); if let Some(history_text) = input_history.write().navigate_previous(¤t_input) @@ -1117,8 +1131,8 @@ pub fn InputSection(mut hooks: Hooks, props: &InputSectionProps) -> impl Into { - // Navigate to next history entry - if !*is_task_running.read() { + // Navigate to next history entry only if file list is not showing + if !*is_task_running.read() && !*file_list_visible.read() { if let Some(history_text) = input_history.write().navigate_next() { input_value.set(history_text.clone()); cursor_position.set((1, history_text.len() + 1)); @@ -1163,6 +1177,12 @@ pub fn InputSection(mut hooks: Hooks, props: &InputSectionProps) -> impl Into Date: Fri, 22 Aug 2025 04:23:38 +0800 Subject: [PATCH 3/3] v0.0.3 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3d5f7bd..fe964d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["core", "cli"] resolver = "2" [workspace.package] -version = "0.0.2" +version = "0.0.3" edition = "2021" authors = ["Blushyes"] license = "MIT OR Apache-2.0"