From 47fcb80498fdf9947155d72e58e95f925f8f4dd2 Mon Sep 17 00:00:00 2001 From: Tyler Longwell Date: Thu, 16 Oct 2025 12:48:40 -0400 Subject: [PATCH] Fix clippy type complexity warning with type alias --- crates/goose/src/agents/subagent_handler.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/goose/src/agents/subagent_handler.rs b/crates/goose/src/agents/subagent_handler.rs index 59e7fb6100..06d1a58ea3 100644 --- a/crates/goose/src/agents/subagent_handler.rs +++ b/crates/goose/src/agents/subagent_handler.rs @@ -12,6 +12,10 @@ use std::future::Future; use std::pin::Pin; use tracing::{debug, info}; +// Type alias for the complex return type +type AgentMessagesFuture = + Pin)>> + Send>>; + /// Standalone function to run a complete subagent task with output options pub async fn run_complete_subagent_task( recipe: Recipe, @@ -94,10 +98,7 @@ pub async fn run_complete_subagent_task( Ok(response_text) } -fn get_agent_messages( - recipe: Recipe, - task_config: TaskConfig, -) -> Pin)>> + Send>> { +fn get_agent_messages(recipe: Recipe, task_config: TaskConfig) -> AgentMessagesFuture { Box::pin(async move { let text_instruction = recipe .instructions