Recover no-action turns after tool errors
This commit is contained in:
@@ -52,6 +52,10 @@ impl PendingResponseStreams {
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn has_stream(&self, stream_id: &ResponseStreamId) -> bool {
|
||||
self.streams.contains_key(stream_id)
|
||||
}
|
||||
|
||||
/// Attempts to inject a plain-text follow-up into an active steerable runtime.
|
||||
///
|
||||
/// Returning `None` leaves the caller free to use the normal
|
||||
|
||||
@@ -845,6 +845,17 @@ impl ResponseStream {
|
||||
self.runtime_capabilities.host_managed_history
|
||||
}
|
||||
|
||||
pub(super) fn has_error_tool_results(&self) -> bool {
|
||||
self.params
|
||||
.tool_results
|
||||
.iter()
|
||||
.any(galaxy_agent_core::ToolResult::is_error)
|
||||
}
|
||||
|
||||
pub(super) fn tool_result_count(&self) -> usize {
|
||||
self.params.tool_results.len()
|
||||
}
|
||||
|
||||
pub fn allows_corrective_retries(&self) -> bool {
|
||||
self.runtime_capabilities.corrective_retries
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user