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

Method publish_diff

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

Publish a session diff event

(&self, session_id: &str, diffs: &[FileDiff])

Source from the content-addressed store, hash-verified

1189
1190 /// Publish a session diff event
1191 pub fn publish_diff(&self, session_id: &str, diffs: &[FileDiff]) {
1192 if let Ok(diff_json) = serde_json::to_value(diffs) {
1193 self.publish_event(
1194 &SESSION_DIFF_EVENT,
1195 serde_json::json!({
1196 "sessionID": session_id,
1197 "diff": diff_json,
1198 }),
1199 );
1200 }
1201 }
1202}
1203
1204impl Default for SessionManager {

Callers

nothing calls this directly

Calls 1

publish_eventMethod · 0.80

Tested by

no test coverage detected