refactor(frontend): 流式展示与契约锚点 SSOT / stream display and contract anchors#511
Merged
Merged
Conversation
…ontract anchors - 侧栏全局消息搜索合并 stream_text_overlay;重命名展示 API 的会话 id 形参语义并补单测 - 开发文档与 ARCHITECTURE 补充流式只读路径与客户端权威表;全仓 api.rs 指称改为 api/ Co-authored-by: Yales Peter <noisystreet@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
落实先前「前端单一真源」讨论中的可执行项:流式助手展示与契约文档锚点对齐,避免侧栏全局搜索与气泡所见分裂;并修正已不存在的
frontend/src/api.rs指称。变更说明
collect_message_search_hits增加stream_overlay参数,对每条消息用message_text_for_display_including_stream_overlay,parent_session_id使用承载该消息的ChatSession::id。侧栏session_rail在生成命中列表时订阅stream_text_overlay,流式过程中也能搜到尾段正文。stream_text_overlay:模块级文档明确只读真源;message_text_for_display_including_stream_overlay/stream_overlay_merged_text_reasoning_owned的会话 id 形参改名为parent_session_id并补充文档(调用仍为位置参数,行为不变)。message_text_for_display_ex、ChatSessionSignals文档与docs/frontend/ARCHITECTURE.md反模式:提示勿对loading助手只读StoredMessage。docs/开发文档.md:前端节补充流式展示说明与「客户端权威」表;api.rs小节改为api/模块树说明。.cursor/rules、SSE中英文档、调试指南、工具说明、contract_map、crate_contract_map工具描述、PR 模板、src/sse/*注释、tests中示例路径等,统一指向frontend/src/api/mod.rs或api/chat_stream/等实际路径。测试
cargo test -p crabmate-web session_searchpre-commit run --all-files(含frontendwasm check / clippy)