while let Ok(chunk) = rx.recv().await {
match chunk {
OutputChunk::TextDelta(text) => print!("{}", text),
OutputChunk::ToolStart { name, .. } => println!("\nUsing {}", name),
OutputChunk::PermissionRequest { tool_name, action, .. } => {
show_permission_dialog(tool_name, action);
}
OutputChunk::Done => break,
_ => {}
}
}