MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / remove

Method remove

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

Source from the content-addressed store, hash-verified

148 }
149
150 pub async fn remove(&self, session_id: &str, index: usize) -> bool {
151 let mut state = self.state.write().await;
152 if let Some(todos) = state.get_mut(session_id) {
153 if index < todos.len() {
154 todos.remove(index);
155
156 if let Some(ref db) = self.db {
157 let todo_id = format!("{}_{}", session_id, index);
158 let _ = db.delete(session_id, &todo_id).await;
159 }
160
161 return true;
162 }
163 }
164 false
165 }
166}
167
168impl Default for TodoManager {

Callers 9

setMethod · 0.45
finish_runMethod · 0.45
cancelMethod · 0.45
process_streamMethod · 0.45
updateMethod · 0.45
clearMethod · 0.45

Calls 2

get_mutMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected