MCPcopy Index your code
hub / github.com/AI45Lab/Code / collect_events

Function collect_events

core/src/tool_confirmation.rs:160–166  ·  view source on GitHub ↗
(rx: &mut mpsc::Receiver<AgentEvent>, count: usize)

Source from the content-addressed store, hash-verified

158 }
159
160 async fn collect_events(rx: &mut mpsc::Receiver<AgentEvent>, count: usize) -> Vec<AgentEvent> {
161 let mut events = Vec::new();
162 for _ in 0..count {
163 events.push(rx.recv().await.expect("missing forwarded event"));
164 }
165 events
166 }
167
168 #[tokio::test]
169 async fn approved_confirmation_returns_approved_and_forwards_events() {

Calls 1

expectMethod · 0.80

Tested by

no test coverage detected