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

Interface SessionOps

crates/opencode-session/src/compaction.rs:157–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155/// tested independently.
156#[allow(async_fn_in_trait)]
157pub trait SessionOps: Send + Sync {
158 /// Fetch all messages (with parts) for a session.
159 async fn messages(&self, session_id: &str) -> anyhow::Result<Vec<MessageWithParts>>;
160
161 /// Upsert a message (create or update). Returns the persisted message info.
162 async fn update_message(&self, info: MessageInfo) -> anyhow::Result<MessageInfo>;
163
164 /// Upsert a part on a message.
165 async fn update_part(
166 &self,
167 session_id: &str,
168 message_id: &str,
169 part: Part,
170 ) -> anyhow::Result<()>;
171}
172
173/// Input for the `create()` function (mirrors TS `SessionCompaction.create`).
174#[derive(Debug, Clone)]

Callers

nothing calls this directly

Implementers 1

compaction.rscrates/opencode-session/src/compaction

Calls

no outgoing calls

Tested by

no test coverage detected