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

Method unshare

crates/opencode-session/src/session.rs:916–927  ·  view source on GitHub ↗

Clear share info and publish session.updated.

(&mut self, session_id: &str)

Source from the content-addressed store, hash-verified

914
915 /// Clear share info and publish session.updated.
916 pub fn unshare(&mut self, session_id: &str) -> Option<Session> {
917 let updated = {
918 let session = self.sessions.get_mut(session_id)?;
919 session.clear_share();
920 session.clone()
921 };
922 self.events.push(SessionEvent::Updated {
923 info: updated.clone(),
924 });
925 self.publish_session_event(&SESSION_UPDATED_EVENT, &updated);
926 Some(updated)
927 }
928
929 /// Set archived time and publish session.updated.
930 pub fn set_archived(&mut self, session_id: &str, time: Option<i64>) -> Option<Session> {

Callers 1

unshare_sessionFunction · 0.80

Calls 4

clear_shareMethod · 0.80
publish_session_eventMethod · 0.80
get_mutMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected