mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-19 16:12:30 +00:00
Runtime context (time, channel, sender) changes every turn, so placing it before user content invalidated the prompt-cache prefix. Appending it after user content keeps the prefix stable and improves KV cache hit rates. The stripping logic in _save_turn was simplified from 16 lines to 6 as a side benefit.