feat: optimize chat stream stability, security, and frontend rendering performance- Security: Added sensitive data redaction (masking password, secret, token, apiKey) for trace logs in backend utility request/response body parsing.
- Stability: Enhanced Durable Object state recovery by persisting and restoring runtime payloads, ensuring the process queue resumes on restart, and adding a 100-second upstream API fetch timeout.
- Database: Bumped DB schema version to 15, adding applySchemaV14 and applySchemaV15 compatibility stubs.
- Performance: Refactored
ChatSessionmessage lists by extracting and memoizingUserMessageRowandAssistantMessageRowwithReact.memo, and extracted static Markdown plugins outside of render scopes to eliminate redundant parsing. - State Management: Integrated Zustand
useShallowselectors acrossApp,ChatInputArea, andChatSessionto prevent unnecessary re-renders. - Resilience: Upgraded stream reconnect/resume flow in the store to pass existing stream progress (content and reasoning), preventing flickering and duplicate content rendering on stream recovery.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.