Merge another `TurnChanges` into this one. Used when combining sub-turn changes (e.g., from multiple tool invocations within a single turn). Deduplicates paths.
(&mut self, other: &TurnChanges)
| 552 | /// Used when combining sub-turn changes (e.g., from multiple tool |
| 553 | /// invocations within a single turn). Deduplicates paths. |
| 554 | pub fn merge(&mut self, other: &TurnChanges) { |
| 555 | merge_paths(&mut self.modified, &other.modified); |
| 556 | merge_paths(&mut self.added, &other.added); |
| 557 | merge_paths(&mut self.deleted, &other.deleted); |
| 558 | |
| 559 | // Use the later timestamp |
| 560 | if other.timestamp > self.timestamp { |
| 561 | self.timestamp = other.timestamp; |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | /// Returns a summary string suitable for log messages. |
| 566 | /// |