-
Notifications
You must be signed in to change notification settings - Fork 354
fix(mobile): 补齐历史窗口空洞,跨空洞不再折成一条工作组 #1210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
18d2b01
fix(mobile): 补齐历史窗口空洞,跨空洞不再折成一条工作组
dashhuang e66c1a0
fix(mobile): 补齐门槛按会话+连接代判定,已考察空洞不再挡住更早的洞
dashhuang 70f794d
fix(mobile): 已考察空洞按结局分类,组时长取全体子项结束时刻最大值
dashhuang f0d9480
fix(mobile): 补齐轮次改用单调序号,并给正常停顿的探测加总闸
dashhuang 01789c3
fix(mobile): 分页游标按服务端顺序取页尾,手动翻页时作废在飞的补齐
dashhuang 19917b2
fix(mobile): 空洞判定改按时刻,吃掉同毫秒组在手机端不可知的次序
dashhuang 1f65b52
fix(mobile): 身份不确定的信号退出判据(空洞 key 用时刻对,settledAt 只认 toolUseId)
dashhuang 180f31d
fix(mobile): 从源头保证消息窗口连续,不再只靠时间阈值发现空洞
dashhuang acee484
fix(mobile): 已连续翻出的历史不被满页同步清掉,只丢来源不明的缓存段
dashhuang 7854016
fix(mobile): 手动翻页同步作废在飞补齐;工作组结束时刻两端都全量取 max
dashhuang 4e1e219
fix(mobile): 窗口连续性改为显式覆盖区间,断流后不再背书漏收的历史
dashhuang f94d36e
fix(mobile): 尾部可信改由订阅 ACK 决定,页比订阅先到不再算可信
dashhuang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,12 @@ | ||
| /** | ||
| * 历史窗口空洞的判定阈值 —— 单一来源。 | ||
| * 历史窗口空洞的判定阈值 —— 桌面侧入口,正本在 `@cindy/maker-shared/history-gap`。 | ||
| * | ||
| * 唯一消费方:`components/chat/MessageStream` —— tool_segment 按它切段、工作组按它切组。 | ||
| * | ||
| * 为什么单独放在 lib 而不是埋在 MessageStream 里:它是一条产品级阈值(多久算"历史不 | ||
| * 连续"),独立成文件便于查找与调整,也留出被 main / 其它 renderer 模块复用的位置而不必 | ||
| * 反向依赖 component(见 docs/dev-rules/architecture-invariants.md 的依赖方向)。 | ||
| * 桌面消费方:`components/chat/MessageStream` —— tool_segment 按它切段、工作组按它切组。 | ||
| * makerChatStore 一度按它模拟切段来估算跳转补齐预算,现已改为按行数取保守上界 | ||
| * (见 JUMP_BACKFILL_MAX_ITEMS),不再依赖本常量。 | ||
| * | ||
| * 为什么是 30 分钟:跳转到历史消息时,目标附近的窗口与已加载的尾部窗口之间可能隔着 | ||
| * 大段没加载的历史(补齐失败时)。渲染层看到的是两段"相邻"item,中间的 user 行(唯一的 | ||
| * turn 边界)全部缺席,于是跨越空洞的所有动作被折成同一个「已工作 Xs」:实测出现过一条 | ||
| * 组吞掉 47 小时、40 条 user 消息的会话,组时长也跟着谎报成 2820m。 | ||
| * | ||
| * 单个 turn 内相邻动作(工具调用 / thinking)正常在秒级到分钟级,等长任务最多几十分钟; | ||
| * 真被误切也只是多出一个折叠条,代价远小于把不相干的两段并成一条并谎报时长。 | ||
| * 为什么保留这层 re-export 而不让 MessageStream 直接引 shared:阈值原本是桌面常量, | ||
| * 手机端接入后成为两端共用的产品级阈值(见正本文件头的完整理由)。留住这个路径让桌面侧 | ||
| * 既有引用与文档指向不必跟着改,同时保证两端逐字节同一把尺子。 | ||
| */ | ||
| export const HISTORY_GAP_SPLIT_MS = 30 * 60 * 1000; | ||
| export { HISTORY_GAP_SPLIT_MS } from '@cindy/maker-shared/history-gap'; |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.