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,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;
|
||||
|
||||
Reference in New Issue
Block a user