mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
Close [AI-195](https://linear.app/affine-design/issue/AI-195) <img width="1219" alt="截屏2025-06-24 10 55 18" src="https://github.com/user-attachments/assets/8c54ad41-2bbf-443a-a41a-9cea9aede7b4" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new component to render various AI stream objects within chat messages, supporting richer content types like reasoning blocks and tool calls. - **Improvements** - Enhanced chat message rendering by consolidating message properties into a single object and simplifying component interfaces. - Improved scrolling behavior with smooth, throttled scrolling and better synchronization with chat status. - Updated chat history and streaming updates to use immutable data handling for more reliable message updates. - Refined rendering keys and content merging for more accurate display of streamed AI responses. - Improved handling and display of tool results and web search/crawl outputs. - **Bug Fixes** - Ensured consistent presence of attachments and streaming objects in chat message data. - Enhanced parsing and merging of streamed AI responses for better message accuracy. - **Refactor** - Streamlined imports, component registrations, and internal message handling for maintainability. - Updated type definitions to support new optional message properties and improve compatibility. - **Style** - Adjusted layout by moving history clear controls for a more intuitive chat interface. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Server
Get started
Install dependencies
yarn
Build Native binding
yarn affine @affine/server-native build
Run server
yarn dev
now you can access the server GraphQL endpoint at http://localhost:3000/graphql