diff --git a/app/Cargo.toml b/app/Cargo.toml index ee9daebf..a918c594 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -5,7 +5,7 @@ description = "Galaxy - AI-powered terminal" edition = "2021" autobins = false name = "galaxy" -version = "1.5.0" +version = "1.5.1" publish.workspace = true license.workspace = true diff --git a/app/src/ai/agent/conversation.rs b/app/src/ai/agent/conversation.rs index 39cedf39..a2b5d839 100644 --- a/app/src/ai/agent/conversation.rs +++ b/app/src/ai/agent/conversation.rs @@ -245,8 +245,6 @@ pub struct AIConversation { /// Set to true when auto-compact fires; reset when summarization completes. has_pending_auto_compact: bool, - /// Number of times this child agent conversation has been automatically - /// restarted after a transient error. Capped at MAX_SUBAGENT_RETRIES. subagent_retry_count: u8, } diff --git a/app/src/ai/agent_sdk/driver/error_classification.rs b/app/src/ai/agent_sdk/driver/error_classification.rs index c5484b91..9ffcfbbe 100644 --- a/app/src/ai/agent_sdk/driver/error_classification.rs +++ b/app/src/ai/agent_sdk/driver/error_classification.rs @@ -1,4 +1,3 @@ -use crate::ai::agent::RenderableAIError; use crate::ai::blocklist::task_status_sync_model::classify_renderable_error; use crate::server::server_api::ai::TaskStatusUpdate; use galaxy_graphql::ai::{AgentTaskState, PlatformErrorCode}; @@ -303,31 +302,6 @@ pub fn classify_driver_error(error: &AgentDriverError) -> (AgentTaskState, TaskS } } -/// Returns true if an `AgentDriverError` represents a transient condition that -/// a subagent can recover from by retrying (e.g., network issues, rate limits, -/// server overload). Permanent errors (auth, config, cancelled) return false. -pub fn is_self_recoverable(error: &AgentDriverError) -> bool { - match error { - AgentDriverError::ConversationError { error: renderable } => { - matches!( - renderable, - RenderableAIError::ServerOverloaded - | RenderableAIError::Other { - will_attempt_resume: true, - .. - } - ) - } - AgentDriverError::WarpDriveSyncFailed - | AgentDriverError::TeamMetadataRefreshTimeout - | AgentDriverError::ShareSessionFailed { - error: ShareSessionError::Timeout, - .. - } => true, - _ => false, - } -} - #[cfg(test)] #[path = "error_classification_tests.rs"] mod tests; diff --git a/app/src/ai/blocklist/agent_view/subagent_inline_panel.rs b/app/src/ai/blocklist/agent_view/subagent_inline_panel.rs index 5f75dfcc..ec716baf 100644 --- a/app/src/ai/blocklist/agent_view/subagent_inline_panel.rs +++ b/app/src/ai/blocklist/agent_view/subagent_inline_panel.rs @@ -33,8 +33,6 @@ pub struct SubagentPanelState { pub conversation_id: AIConversationId, pub is_expanded: bool, pub header_mouse_state: MouseStateHandle, - pub expand_button_mouse_state: MouseStateHandle, - pub cancel_button_mouse_state: MouseStateHandle, } impl SubagentPanelState { @@ -43,8 +41,6 @@ impl SubagentPanelState { conversation_id, is_expanded: false, header_mouse_state: MouseStateHandle::default(), - expand_button_mouse_state: MouseStateHandle::default(), - cancel_button_mouse_state: MouseStateHandle::default(), } } } diff --git a/app/src/ai/blocklist/controller.rs b/app/src/ai/blocklist/controller.rs index 85d35477..7274a7fa 100644 --- a/app/src/ai/blocklist/controller.rs +++ b/app/src/ai/blocklist/controller.rs @@ -1576,11 +1576,7 @@ impl BlocklistAIController { source_conversation_id, question_text, options, - .. } => { - // Auto-answer: pick the first option, or echo the question text - // as a default answer. In a future version, this could invoke the - // parent LLM for a contextual answer. let answer = options.first().cloned().unwrap_or_else(|| { format!("Proceed with: {}", question_text) }); @@ -1590,15 +1586,11 @@ impl BlocklistAIController { }); } PendingEventDetail::SubagentAnswer { - answer_text, .. + answer_text, } => { - // This fires on the child's controller — complete its pending question. self.complete_ask_user_question_with_answer(answer_text, ctx); } - PendingEventDetail::SubagentCompletionSummary { .. } => { - // Summary is consumed by the inline panel renderer directly. - // No controller action needed. - } + PendingEventDetail::SubagentCompletionSummary => {} _ => {} } } diff --git a/app/src/ai/blocklist/orchestration_events.rs b/app/src/ai/blocklist/orchestration_events.rs index 718510dc..831be054 100644 --- a/app/src/ai/blocklist/orchestration_events.rs +++ b/app/src/ai/blocklist/orchestration_events.rs @@ -19,7 +19,6 @@ use warp_multi_agent_api as api; const MAX_RETRY_ATTEMPTS: i32 = 3; const MAX_PENDING_LIFECYCLE_EVENTS_PER_TARGET: usize = 200; -pub const MAX_SUBAGENT_RETRIES: u8 = 3; const MAX_SUBAGENT_QUESTION_DEPTH: u8 = 3; /// Stage associated with a lifecycle error detail. @@ -71,18 +70,13 @@ pub enum PendingEventDetail { source_conversation_id: AIConversationId, question_text: String, options: Vec, - depth: u8, }, /// The parent's answer to a subagent's question. SubagentAnswer { - target_conversation_id: AIConversationId, answer_text: String, }, /// A subagent reporting its completion summary to the parent. - SubagentCompletionSummary { - source_conversation_id: AIConversationId, - summary_text: String, - }, + SubagentCompletionSummary, } /// A queued event consumed by the controller. @@ -594,11 +588,10 @@ impl OrchestrationEventService { } }); - if let Some(summary_text) = summary { + if summary.is_some() { self.route_subagent_completion_summary( conversation_id, parent_id, - summary_text, ctx, ); } @@ -1032,7 +1025,7 @@ impl OrchestrationEventService { // not converted to AIAgentInput or awaited for server echo. PendingEventDetail::SubagentQuestion { .. } | PendingEventDetail::SubagentAnswer { .. } - | PendingEventDetail::SubagentCompletionSummary { .. } => {} + | PendingEventDetail::SubagentCompletionSummary => {} } } @@ -1070,7 +1063,7 @@ impl OrchestrationEventService { pending.retain(|event| match &event.detail { PendingEventDetail::SubagentQuestion { .. } | PendingEventDetail::SubagentAnswer { .. } - | PendingEventDetail::SubagentCompletionSummary { .. } => { + | PendingEventDetail::SubagentCompletionSummary => { subagent_events.push(event.clone()); false } @@ -1254,7 +1247,6 @@ impl OrchestrationEventService { source_conversation_id: child_conversation_id, question_text, options, - depth, }, }; @@ -1280,7 +1272,6 @@ impl OrchestrationEventService { source_agent_id: "parent".to_string(), attempt_count: 0, detail: PendingEventDetail::SubagentAnswer { - target_conversation_id: child_conversation_id, answer_text, }, }; @@ -1300,17 +1291,13 @@ impl OrchestrationEventService { &mut self, child_conversation_id: AIConversationId, parent_conversation_id: AIConversationId, - summary_text: String, ctx: &mut ModelContext, ) { let event = PendingEvent { event_id: Uuid::new_v4().to_string(), source_agent_id: child_conversation_id.to_string(), attempt_count: 0, - detail: PendingEventDetail::SubagentCompletionSummary { - source_conversation_id: child_conversation_id, - summary_text, - }, + detail: PendingEventDetail::SubagentCompletionSummary, }; self.pending_events @@ -1351,7 +1338,7 @@ fn did_event_round_trip_through_server( // Local-only events never round-trip through the server. PendingEventDetail::SubagentQuestion { .. } | PendingEventDetail::SubagentAnswer { .. } - | PendingEventDetail::SubagentCompletionSummary { .. } => false, + | PendingEventDetail::SubagentCompletionSummary => false, } }