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

Method get

crates/opencode-session/src/todo.rs:82–98  ·  view source on GitHub ↗
(&self, session_id: &str)

Source from the content-addressed store, hash-verified

80 }
81
82 pub async fn get(&self, session_id: &str) -> Vec<TodoInfo> {
83 if let Some(ref db) = self.db {
84 if let Ok(items) = db.list_for_session(session_id).await {
85 return items
86 .into_iter()
87 .map(|item| TodoInfo {
88 content: item.content,
89 status: item.status,
90 priority: item.priority,
91 })
92 .collect();
93 }
94 }
95
96 let state = self.state.read().await;
97 state.get(session_id).cloned().unwrap_or_default()
98 }
99
100 pub async fn clear(&self, session_id: &str) {
101 if let Some(ref db) = self.db {

Callers 15

callbackMethod · 0.45
start_oauthMethod · 0.45
get_serverMethod · 0.45
list_serversMethod · 0.45
get_logsMethod · 0.45
remove_oauthMethod · 0.45
managed_serverMethod · 0.45
oauth_status_forMethod · 0.45
session_routesFunction · 0.45
session_statusFunction · 0.45
get_sessionFunction · 0.45

Calls 2

list_for_sessionMethod · 0.80
readMethod · 0.80

Tested by

no test coverage detected