mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
30ad7c1d0b
- Add StepMessagesHandler callback to agent's GenerateWithLoopAndStreaming so callers can persist messages as each step completes - Wire onStepMessages in Kit.generate() to call session.AppendMessage for each step's messages immediately on completion - Track PersistedMessageCount on GenerateWithLoopResult so runTurn skips already-persisted messages in post-generation cleanup - Tool calls are always persisted as assistant+tool pairs (never orphaned) - Document concurrency and incremental persistence requirements on the SessionManager interface for custom implementations