fix(coding-agent): sync agent state after newSession setup callback

Move setup callback handling from interactive/rpc modes into AgentSession.newSession().
After setup() runs, sync agent state via replaceMessages() so the LLM has context
and the UI renders the messages properly.

fixes #968
This commit is contained in:
Mario Zechner 2026-01-26 22:25:09 +01:00
parent 0134a2a73d
commit f86e3c3103
4 changed files with 25 additions and 15 deletions

View file

@ -5,6 +5,7 @@
### Fixed
- Git extension updates now handle force-pushed remotes gracefully instead of failing ([#961](https://github.com/badlogic/pi-mono/pull/961) by [@aliou](https://github.com/aliou))
- Extension `ctx.newSession({ setup })` now properly syncs agent state and renders messages after setup callback runs ([#968](https://github.com/badlogic/pi-mono/issues/968))
## [0.50.0] - 2026-01-26