(
opts: &SessionOptions,
agent_event_tx: broadcast::Sender<AgentEvent>,
)
| 48 | } |
| 49 | |
| 50 | fn build_confirmation_manager( |
| 51 | opts: &SessionOptions, |
| 52 | agent_event_tx: broadcast::Sender<AgentEvent>, |
| 53 | ) -> Option<Arc<dyn ConfirmationProvider>> { |
| 54 | if opts.confirmation_manager.is_some() { |
| 55 | opts.confirmation_manager.clone() |
| 56 | } else if let Some(policy) = &opts.confirmation_policy { |
| 57 | let manager = Arc::new(crate::hitl::ConfirmationManager::new( |
| 58 | policy.clone(), |
| 59 | agent_event_tx, |
| 60 | )); |
| 61 | Some(manager as Arc<dyn ConfirmationProvider>) |
| 62 | } else { |
| 63 | None |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | fn build_command_queue( |
| 68 | opts: &SessionOptions, |
no test coverage detected