MCPcopy Create free account
hub / github.com/AI45Lab/Code / current_run

Method current_run

sdk/node/src/lib.rs:3564–3577  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

3562 /// Return the currently running operation, or null when idle.
3563 #[napi(js_name = "currentRun")]
3564 pub async fn current_run(&self) -> napi::Result<serde_json::Value> {
3565 let session = self.inner.clone();
3566 let snapshot = get_runtime()
3567 .spawn(async move {
3568 match session.current_run().await {
3569 Some(run) => run.snapshot().await,
3570 None => None,
3571 }
3572 })
3573 .await
3574 .map_err(|e| napi::Error::from_reason(format!("Task join error: {e}")))?;
3575 serde_json::to_value(snapshot)
3576 .map_err(|e| napi::Error::from_reason(format!("Serialization error: {e}")))
3577 }
3578
3579 /// Return active tool calls observed for the currently running operation.
3580 #[napi(js_name = "activeTools")]

Callers

nothing calls this directly

Calls 4

get_runtimeFunction · 0.70
cloneMethod · 0.45
spawnMethod · 0.45
snapshotMethod · 0.45

Tested by

no test coverage detected