Fix unbound variable and read_text() bugs in event services (#12297)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Tim O'Farrell
2026-01-07 15:07:23 -07:00
committed by GitHub
parent 11d1e79506
commit bbdedf8641
3 changed files with 537 additions and 1 deletions

View File

@@ -107,6 +107,7 @@ class EventServiceBase(EventService, ABC):
)
start_offset = 0
next_page_id = None
if page_id:
start_offset = int(page_id)
paths = paths[start_offset:]

View File

@@ -22,7 +22,7 @@ class FilesystemEventService(EventServiceBase):
def _load_event(self, path: Path) -> Event | None:
try:
content = path.read_text(str(path))
content = path.read_text()
content = Event.model_validate_json(content)
return content
except Exception: