mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-19 16:12:30 +00:00
Shortcut commands (e.g. /help, /pairing) skip BUILD and SAVE states, so their turns were never persisted to the session. This caused WebUI chats to appear empty after _turn_end because history hydration reads from the session file. Fix by persisting the user message and assistant response inside _state_command, but tag them with _command=True so Session.get_history filters them out of LLM context. /new is excluded because it intentionally clears the session. - AgentLoop._persist_user_message_early now accepts **kwargs so _state_command can pass _command=True for the user turn. - Session.get_history skips messages with _command=True.