| 155 | /// tested independently. |
| 156 | #[allow(async_fn_in_trait)] |
| 157 | pub 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)] |
nothing calls this directly
no outgoing calls
no test coverage detected