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)
| 943 | /// Used when combining sub-turn changes (e.g., from multiple tool |
| 944 | /// invocations within a single turn). Deduplicates paths. |
| 945 | pub fn merge(&mut self, other: &TurnChanges) { |
| 946 | merge_paths(&mut self.modified, &other.modified); |
| 947 | merge_paths(&mut self.added, &other.added); |
| 948 | merge_paths(&mut self.deleted, &other.deleted); |
| 949 | |
| 950 | // Use the later timestamp |
| 951 | if other.timestamp > self.timestamp { |
| 952 | self.timestamp = other.timestamp; |
| 953 | } |
| 954 | } |
| 955 | |
| 956 | /// Returns a summary string suitable for log messages. |
| 957 | /// |