Add unit tests for View object (#8900)

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Calvin Smith <calvin@all-hands.dev>
This commit is contained in:
Calvin Smith
2025-06-04 19:35:32 -06:00
committed by GitHub
parent 91e24a4a31
commit 41cee4b68d
3 changed files with 114 additions and 6 deletions

View File

@@ -50,6 +50,8 @@ class View(BaseModel):
for event in events:
if isinstance(event, CondensationAction):
forgotten_event_ids.update(event.forgotten)
# Make sure we also forget the condensation action itself
forgotten_event_ids.add(event.id)
kept_events = [event for event in events if event.id not in forgotten_event_ids]