# Refactor snapshot handling for agents and utilities · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/98cffd7071b7f0ae844e9eb66eb460dce91b5c5b)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: 98cffd7071b7f0ae844e9eb66eb460dce91b5c5b

Requested commit: 98cffd7071b7f0ae844e9eb66eb460dce91b5c5b

Commit: 98cffd7071b7f0ae844e9eb66eb460dce91b5c5b

Tree: 8dc3ed1887fd10afa73f60a3a4192a7854447c56

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Refactor snapshot handling for agents and utilities

- Replace `deepCopy` with `snapshotCopy` in `AgentProvider` and `UtilityProvider` to preserve undo/redo stacks.
- Introduce `_snapshotCloneWidget` and `_copyHistoryTo` methods in `PlacedWidget` for improved snapshot management.
- Update related logic in `strategy_provider.dart` for better handling of agent data during JSON serialization.

```

## Parents

- [5511d4f9ce3177a3f10e8d6a529b763149d7f28c](https://git.cafe/dara/icarus/commit/5511d4f9ce3177a3f10e8d6a529b763149d7f28c?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/98cffd7071b7f0ae844e9eb66eb460dce91b5c5b?format=markdown)
