MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / get

Method get

crates/opencode-session/src/status.rs:70–73  ·  view source on GitHub ↗

Get the status for a session. Returns Idle if not tracked. Matches TS `SessionStatus.get(sessionID)`.

(&self, session_id: &str)

Source from the content-addressed store, hash-verified

68 /// Get the status for a session. Returns Idle if not tracked.
69 /// Matches TS `SessionStatus.get(sessionID)`.
70 pub async fn get(&self, session_id: &str) -> SessionStatusInfo {
71 let state = self.state.read().await;
72 state.get(session_id).cloned().unwrap_or_default()
73 }
74
75 /// List all tracked session statuses.
76 /// Matches TS `SessionStatus.list()`.

Callers 2

test_default_is_idleFunction · 0.45
test_set_retryFunction · 0.45

Calls 1

readMethod · 0.80

Tested by 2

test_default_is_idleFunction · 0.36
test_set_retryFunction · 0.36