(
&self,
node_id: &str,
)
| 3028 | } |
| 3029 | |
| 3030 | async fn codex_compaction_summary_draft( |
| 3031 | &self, |
| 3032 | node_id: &str, |
| 3033 | ) -> Result<LcmSummaryNodeDraft, crate::sessions::lcm::LcmError> { |
| 3034 | let mut rows = self |
| 3035 | .conn |
| 3036 | .query( |
| 3037 | "SELECT provider, conversation_id, session_id, depth, summary_text, |
| 3038 | summary_token_count, source_token_count, source_time_start, |
| 3039 | source_time_end, expand_hint, metadata_json |
| 3040 | FROM lcm_summary_nodes |
| 3041 | WHERE node_id = ?1", |
| 3042 | params![node_id], |
| 3043 | ) |
| 3044 | .await?; |
| 3045 | let row = rows |
| 3046 | .next() |
| 3047 | .await? |
| 3048 | .ok_or(crate::sessions::lcm::LcmError::SummaryNodeNotFound)?; |
| 3049 | let source_refs = self.summary_source_refs(node_id).await?; |
| 3050 | Ok(LcmSummaryNodeDraft { |
| 3051 | provider: row.get(0)?, |
| 3052 | conversation_id: row.get(1)?, |
| 3053 | session_id: row.get(2)?, |
| 3054 | depth: row.get(3)?, |
| 3055 | summary_text: row.get(4)?, |
| 3056 | summary_token_count: row.get(5)?, |
| 3057 | source_token_count: row.get(6)?, |
| 3058 | source_time_start: row.get(7)?, |
| 3059 | source_time_end: row.get(8)?, |
| 3060 | expand_hint: row.get(9)?, |
| 3061 | metadata_json: row.get(10)?, |
| 3062 | source_refs, |
| 3063 | }) |
| 3064 | } |
| 3065 | |
| 3066 | async fn summary_source_refs( |
| 3067 | &self, |
no test coverage detected