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)
| 560 | /// Used when combining sub-turn changes (e.g., from multiple tool |
| 561 | /// invocations within a single turn). Deduplicates paths. |
| 562 | pub fn merge(&mut self, other: &TurnChanges) { |
| 563 | merge_paths(&mut self.modified, &other.modified); |
| 564 | merge_paths(&mut self.added, &other.added); |
| 565 | merge_paths(&mut self.deleted, &other.deleted); |
| 566 | |
| 567 | // Use the later timestamp |
| 568 | if other.timestamp > self.timestamp { |
| 569 | self.timestamp = other.timestamp; |
| 570 | } |
| 571 | } |
| 572 | |
| 573 | /// Returns a summary string suitable for log messages. |
| 574 | /// |