v1.5.1: Remove dead code and fix all build warnings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
f278e53b7e
commit
a0568508ea
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<String>,
|
||||
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<Self>,
|
||||
) {
|
||||
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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user