Feat/story summary delay floors - #88
Open
sun19970908 wants to merge 2 commits into
Open
Conversation
sun19970908
commented
Sep 11, 2026
- 增加一个延迟总结的功能,解决的痛点是,最后一层刚好是被总结的状态,然后又要roll的时候l2会不准确
- 由于有延迟总结的功能,可以让l2严格回滚,不用留宽容度
自动/手动总结的目标楼层由「最新一楼」改为「最新一楼往前推 N 楼」, N 在总结设置面板填写(延迟总结楼层,0~30),手动与自动一致。 - config.js: trigger 新增 delayFloors 默认值 0,normalize 钳位 0~30 - story-summary.html / story-summary-ui.js: 新增输入项与载入/保存/范围校验 - story-summary.js: 自动路径取 Math.min(上游 sourceEnd 边界, 最新楼 - delayFloors), 手动路径同步偏移 默认 0 时行为与改动前逐字节一致,不影响现有用户。
isSummaryRollbackRequired 的容差由 2 改为 1:只要 lastSummarized 指向的 楼层已不存在(锚点悬空)就判定需要回滚。 原逻辑下删除 1 楼会让 lastSummarized 指向已经不存在的楼层,隐藏区间与 注入边界按该锚点计算会读到越界楼层。配合上一个提交的延迟楼层,尾部本身 就有缓冲楼层,不再需要靠「容差 1 楼」吸收删除/重 roll 的抖动。
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.