mirror of
https://github.com/FireRedTeam/FireRed-OpenStoryline.git
synced 2026-08-28 18:51:38 +08:00
f00971f906
* feat: persist chat sessions securely across restarts Persist session state to disk with safe recovery and secret redaction so chat can continue after server restart. Made-with: Cursor * fix: prevent orphan tool messages after session restore Ensure restored AIMessage tool_calls are reconstructed and sanitize lc_messages to avoid provider 400 errors. Made-with: Cursor * fix: harden tool_calls persistence and restore sequencing Persist explicit AIMessage tool_calls and enforce block-scoped tool message closure/sanitization so restored sessions avoid orphan-tool protocol violations across providers. Made-with: Cursor * fix(session): address review — warn on empty tool_call_id; tighten string secret masking Made-with: Cursor * fix(session): return 503 for unreadable state; 404 for missing/mismatch; clarify vs review Made-with: Cursor * fix(web): typed HttpError for getSession; 404-only local cleanup; bootstrap retry Made-with: Cursor * fix(session): fail-closed restore + redact secrets in persisted config Made-with: Cursor * fix(session): address review — tool-safe lc trim, header helper, sent_media_total, 3-state bootstrap Made-with: Cursor * Sanitize protocol on lc_messages before merging requests Added sanitization of protocol on sess.lc_messages before building the merged request list for astream to ensure the structure is always sanitized.