mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-03 15:12:48 +00:00
Pi's streamHistory only emitted text, so resuming a session lost tool calls, tool results, and bash executions from the replayed timeline. Iterate session.messages to also emit running/completed/failed tool_call items and bashExecution shell calls, and tag user messages with a stable messageId so hydrateTimelineFromLegacyProviderHistory can dedupe. Cover it with a real OpenRouter-backed e2e test that runs a bash tool call, resumes via PiDirectAgentClient.resumeSession, and asserts the replayed timeline contains the user message, assistant message, and completed shell tool_call with the expected output.