MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / end_turn

Method end_turn

atomic-agent/src/watcher/fallback.rs:231–251  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

229 }
230
231 fn end_turn(&mut self) -> Pin<Box<dyn Future<Output = AgentResult<TurnChanges>> + Send + '_>> {
232 Box::pin(async move {
233 let pre = self
234 .pre_snapshot
235 .take()
236 .ok_or_else(|| AgentError::TurnNotActive {
237 session_id: self
238 .active_session
239 .as_deref()
240 .unwrap_or("unknown")
241 .to_string(),
242 })?;
243
244 let post = take_snapshot(self.config.repo_root(), self.config.ignore_patterns())?;
245
246 let changes = diff_snapshots(&pre, &post);
247
248 self.active_session = None;
249 Ok(changes)
250 })
251 }
252
253 fn cancel_turn(&mut self) -> Pin<Box<dyn Future<Output = AgentResult<()>> + Send + '_>> {
254 Box::pin(async move {

Calls 4

take_snapshotFunction · 0.85
diff_snapshotsFunction · 0.85
ignore_patternsMethod · 0.80
repo_rootMethod · 0.45