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"
|
edition = "2021"
|
||||||
autobins = false
|
autobins = false
|
||||||
name = "galaxy"
|
name = "galaxy"
|
||||||
version = "1.5.0"
|
version = "1.5.1"
|
||||||
publish.workspace = true
|
publish.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
|
||||||
|
|||||||
@@ -245,8 +245,6 @@ pub struct AIConversation {
|
|||||||
/// Set to true when auto-compact fires; reset when summarization completes.
|
/// Set to true when auto-compact fires; reset when summarization completes.
|
||||||
has_pending_auto_compact: bool,
|
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,
|
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::ai::blocklist::task_status_sync_model::classify_renderable_error;
|
||||||
use crate::server::server_api::ai::TaskStatusUpdate;
|
use crate::server::server_api::ai::TaskStatusUpdate;
|
||||||
use galaxy_graphql::ai::{AgentTaskState, PlatformErrorCode};
|
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)]
|
#[cfg(test)]
|
||||||
#[path = "error_classification_tests.rs"]
|
#[path = "error_classification_tests.rs"]
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ pub struct SubagentPanelState {
|
|||||||
pub conversation_id: AIConversationId,
|
pub conversation_id: AIConversationId,
|
||||||
pub is_expanded: bool,
|
pub is_expanded: bool,
|
||||||
pub header_mouse_state: MouseStateHandle,
|
pub header_mouse_state: MouseStateHandle,
|
||||||
pub expand_button_mouse_state: MouseStateHandle,
|
|
||||||
pub cancel_button_mouse_state: MouseStateHandle,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SubagentPanelState {
|
impl SubagentPanelState {
|
||||||
@@ -43,8 +41,6 @@ impl SubagentPanelState {
|
|||||||
conversation_id,
|
conversation_id,
|
||||||
is_expanded: false,
|
is_expanded: false,
|
||||||
header_mouse_state: MouseStateHandle::default(),
|
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,
|
source_conversation_id,
|
||||||
question_text,
|
question_text,
|
||||||
options,
|
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(|| {
|
let answer = options.first().cloned().unwrap_or_else(|| {
|
||||||
format!("Proceed with: {}", question_text)
|
format!("Proceed with: {}", question_text)
|
||||||
});
|
});
|
||||||
@@ -1590,15 +1586,11 @@ impl BlocklistAIController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
PendingEventDetail::SubagentAnswer {
|
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);
|
self.complete_ask_user_question_with_answer(answer_text, ctx);
|
||||||
}
|
}
|
||||||
PendingEventDetail::SubagentCompletionSummary { .. } => {
|
PendingEventDetail::SubagentCompletionSummary => {}
|
||||||
// Summary is consumed by the inline panel renderer directly.
|
|
||||||
// No controller action needed.
|
|
||||||
}
|
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ use warp_multi_agent_api as api;
|
|||||||
|
|
||||||
const MAX_RETRY_ATTEMPTS: i32 = 3;
|
const MAX_RETRY_ATTEMPTS: i32 = 3;
|
||||||
const MAX_PENDING_LIFECYCLE_EVENTS_PER_TARGET: usize = 200;
|
const MAX_PENDING_LIFECYCLE_EVENTS_PER_TARGET: usize = 200;
|
||||||
pub const MAX_SUBAGENT_RETRIES: u8 = 3;
|
|
||||||
const MAX_SUBAGENT_QUESTION_DEPTH: u8 = 3;
|
const MAX_SUBAGENT_QUESTION_DEPTH: u8 = 3;
|
||||||
|
|
||||||
/// Stage associated with a lifecycle error detail.
|
/// Stage associated with a lifecycle error detail.
|
||||||
@@ -71,18 +70,13 @@ pub enum PendingEventDetail {
|
|||||||
source_conversation_id: AIConversationId,
|
source_conversation_id: AIConversationId,
|
||||||
question_text: String,
|
question_text: String,
|
||||||
options: Vec<String>,
|
options: Vec<String>,
|
||||||
depth: u8,
|
|
||||||
},
|
},
|
||||||
/// The parent's answer to a subagent's question.
|
/// The parent's answer to a subagent's question.
|
||||||
SubagentAnswer {
|
SubagentAnswer {
|
||||||
target_conversation_id: AIConversationId,
|
|
||||||
answer_text: String,
|
answer_text: String,
|
||||||
},
|
},
|
||||||
/// A subagent reporting its completion summary to the parent.
|
/// A subagent reporting its completion summary to the parent.
|
||||||
SubagentCompletionSummary {
|
SubagentCompletionSummary,
|
||||||
source_conversation_id: AIConversationId,
|
|
||||||
summary_text: String,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A queued event consumed by the controller.
|
/// 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(
|
self.route_subagent_completion_summary(
|
||||||
conversation_id,
|
conversation_id,
|
||||||
parent_id,
|
parent_id,
|
||||||
summary_text,
|
|
||||||
ctx,
|
ctx,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1032,7 +1025,7 @@ impl OrchestrationEventService {
|
|||||||
// not converted to AIAgentInput or awaited for server echo.
|
// not converted to AIAgentInput or awaited for server echo.
|
||||||
PendingEventDetail::SubagentQuestion { .. }
|
PendingEventDetail::SubagentQuestion { .. }
|
||||||
| PendingEventDetail::SubagentAnswer { .. }
|
| PendingEventDetail::SubagentAnswer { .. }
|
||||||
| PendingEventDetail::SubagentCompletionSummary { .. } => {}
|
| PendingEventDetail::SubagentCompletionSummary => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1070,7 +1063,7 @@ impl OrchestrationEventService {
|
|||||||
pending.retain(|event| match &event.detail {
|
pending.retain(|event| match &event.detail {
|
||||||
PendingEventDetail::SubagentQuestion { .. }
|
PendingEventDetail::SubagentQuestion { .. }
|
||||||
| PendingEventDetail::SubagentAnswer { .. }
|
| PendingEventDetail::SubagentAnswer { .. }
|
||||||
| PendingEventDetail::SubagentCompletionSummary { .. } => {
|
| PendingEventDetail::SubagentCompletionSummary => {
|
||||||
subagent_events.push(event.clone());
|
subagent_events.push(event.clone());
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
@@ -1254,7 +1247,6 @@ impl OrchestrationEventService {
|
|||||||
source_conversation_id: child_conversation_id,
|
source_conversation_id: child_conversation_id,
|
||||||
question_text,
|
question_text,
|
||||||
options,
|
options,
|
||||||
depth,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1280,7 +1272,6 @@ impl OrchestrationEventService {
|
|||||||
source_agent_id: "parent".to_string(),
|
source_agent_id: "parent".to_string(),
|
||||||
attempt_count: 0,
|
attempt_count: 0,
|
||||||
detail: PendingEventDetail::SubagentAnswer {
|
detail: PendingEventDetail::SubagentAnswer {
|
||||||
target_conversation_id: child_conversation_id,
|
|
||||||
answer_text,
|
answer_text,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -1300,17 +1291,13 @@ impl OrchestrationEventService {
|
|||||||
&mut self,
|
&mut self,
|
||||||
child_conversation_id: AIConversationId,
|
child_conversation_id: AIConversationId,
|
||||||
parent_conversation_id: AIConversationId,
|
parent_conversation_id: AIConversationId,
|
||||||
summary_text: String,
|
|
||||||
ctx: &mut ModelContext<Self>,
|
ctx: &mut ModelContext<Self>,
|
||||||
) {
|
) {
|
||||||
let event = PendingEvent {
|
let event = PendingEvent {
|
||||||
event_id: Uuid::new_v4().to_string(),
|
event_id: Uuid::new_v4().to_string(),
|
||||||
source_agent_id: child_conversation_id.to_string(),
|
source_agent_id: child_conversation_id.to_string(),
|
||||||
attempt_count: 0,
|
attempt_count: 0,
|
||||||
detail: PendingEventDetail::SubagentCompletionSummary {
|
detail: PendingEventDetail::SubagentCompletionSummary,
|
||||||
source_conversation_id: child_conversation_id,
|
|
||||||
summary_text,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.pending_events
|
self.pending_events
|
||||||
@@ -1351,7 +1338,7 @@ fn did_event_round_trip_through_server(
|
|||||||
// Local-only events never round-trip through the server.
|
// Local-only events never round-trip through the server.
|
||||||
PendingEventDetail::SubagentQuestion { .. }
|
PendingEventDetail::SubagentQuestion { .. }
|
||||||
| PendingEventDetail::SubagentAnswer { .. }
|
| PendingEventDetail::SubagentAnswer { .. }
|
||||||
| PendingEventDetail::SubagentCompletionSummary { .. } => false,
|
| PendingEventDetail::SubagentCompletionSummary => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user