Method
should_prune
(messages: &[MessageForPrune])
Source from the content-addressed store, hash-verified
| 365 | } |
| 366 | |
| 367 | fn should_prune(messages: &[MessageForPrune]) -> bool { |
| 368 | for msg in messages { |
| 369 | for part in &msg.parts { |
| 370 | if !part.tool.is_empty() |
| 371 | && part.status == ToolPartStatus::Completed |
| 372 | && part.compacted.is_none() |
| 373 | { |
| 374 | return true; |
| 375 | } |
| 376 | } |
| 377 | } |
| 378 | false |
| 379 | } |
| 380 | |
| 381 | pub fn create_compaction_part(auto: bool) -> CompactionPart { |
| 382 | // Plugin hook: session.compacting — notify plugins that compaction is starting. |
Callers
nothing calls this directly
Tested by
no test coverage detected