MCPcopy Index your code
hub / github.com/InfinitiBit/graphbit / history

Method history

python/src/memory/client.rs:218–232  ·  view source on GitHub ↗

Get the mutation history for a memory.

(&self, py: Python<'_>, memory_id: String)

Source from the content-addressed store, hash-verified

216
217 /// Get the mutation history for a memory.
218 fn history(&self, py: Python<'_>, memory_id: String) -> PyResult<Vec<PyMemoryHistory>> {
219 let id = parse_memory_id(&memory_id)?;
220 let service = Arc::clone(&self.service);
221 let rt = get_runtime();
222
223 py.allow_threads(|| {
224 rt.block_on(async move {
225 let entries = service
226 .history(&id)
227 .await
228 .map_err(to_py_runtime_error)?;
229 Ok(entries.into_iter().map(PyMemoryHistory::from).collect())
230 })
231 })
232 }
233}
234
235// ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

parse_memory_idFunction · 0.85
get_runtimeFunction · 0.50

Tested by

no test coverage detected