diff --git a/CHANGELOG.md b/CHANGELOG.md index 53911dc0..1e3d1d6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +**Core** + +- Fixed `MessageHistory.to_list()` returning a reference to the internal list instead of a copy, causing simulator logs to contain future conversation messages that hadn't occurred at the time of logging. (PR: #PR_NUMBER_PLACEHOLDER) + ### Added **Core** diff --git a/maseval/core/history.py b/maseval/core/history.py index 49ba8ee6..0703f572 100644 --- a/maseval/core/history.py +++ b/maseval/core/history.py @@ -110,7 +110,7 @@ def to_list(self) -> List[Dict[str, Any]]: Returns: List of message dictionaries in OpenAI format """ - return self._messages + return list(self._messages) def add_message( self,