pub async fn run_loop_interactive<F, Fut>(
agent: &dyn Agent,
tools: &ToolRegistry,
ctx: &mut AgentContext,
messages: &mut Vec<Message>,
config: &LoopConfig,
on_event: impl FnMut(LoopEvent),
on_input: F,
) -> Result<usize, AgentError>Expand description
Core agent loop — single implementation for both interactive and non-interactive modes.
When a tool returns ToolOutput::waiting, calls on_input with the question.
run_loop delegates here with a passive handler that returns a placeholder.