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

Method get_session_todos

atomic-repository/src/repository/changes.rs:1784–1800  ·  view source on GitHub ↗

Get all todos for a provenance graph. Returns snapshots of all todo items from the turn, for any agent. Empty if the provenance recorded no todos / no session data.

(
        &self,
        provenance_hash: &Hash,
    )

Source from the content-addressed store, hash-verified

1782 /// Returns snapshots of all todo items from the turn, for any agent.
1783 /// Empty if the provenance recorded no todos / no session data.
1784 pub fn get_session_todos(
1785 &self,
1786 provenance_hash: &Hash,
1787 ) -> Result<Vec<atomic_core::change::session::TodoSnapshot>, RepositoryError> {
1788 let txn = self
1789 .pristine
1790 .read_txn()
1791 .map_err(|e| RepositoryError::Database(e.to_string()))?;
1792 let provenance_id = txn
1793 .get_internal(provenance_hash)
1794 .map_err(|e| RepositoryError::Database(e.to_string()))?
1795 .ok_or_else(|| RepositoryError::ChangeNotFound {
1796 hash: provenance_hash.to_base32(),
1797 })?;
1798 txn.get_session_todos(provenance_id.get())
1799 .map_err(|e| RepositoryError::Database(e.to_string()))
1800 }
1801
1802 /// Get phase timing breakdown for a provenance graph.
1803 ///

Callers

nothing calls this directly

Calls 4

read_txnMethod · 0.80
getMethod · 0.65
get_internalMethod · 0.45
to_base32Method · 0.45

Tested by

no test coverage detected