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

Method start

crates/opencode-session/src/prompt.rs:720–736  ·  view source on GitHub ↗
(&self, session_id: &str)

Source from the content-addressed store, hash-verified

718 }
719
720 async fn start(&self, session_id: &str) -> Option<CancellationToken> {
721 let state = self.state.lock().await;
722 if state.contains_key(session_id) {
723 return None;
724 }
725 drop(state);
726
727 let token = CancellationToken::new();
728 let mut state = self.state.lock().await;
729 state.insert(
730 session_id.to_string(),
731 PromptState {
732 cancel_token: token.clone(),
733 },
734 );
735 Some(token)
736 }
737
738 async fn resume(&self, session_id: &str) -> Option<CancellationToken> {
739 let state = self.state.lock().await;

Callers 1

Calls 2

newFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected