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

Method update

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

Update a session

(&mut self, session: Session)

Source from the content-addressed store, hash-verified

1101
1102 /// Update a session
1103 pub fn update(&mut self, session: Session) {
1104 let id = session.id.clone();
1105 self.sessions.insert(id, session.clone());
1106 self.events.push(SessionEvent::Updated {
1107 info: session.clone(),
1108 });
1109 self.publish_session_event(&SESSION_UPDATED_EVENT, &session);
1110 }
1111
1112 /// Get events (and clear them)
1113 pub fn drain_events(&mut self) -> Vec<SessionEvent> {

Callers

nothing calls this directly

Calls 2

publish_session_eventMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected