Repository navigation
fix(agents): 搜索命中带上所在文件的 generation 与 readBytes - #241
Merged
Merged
Conversation
命中可能在子代理文件里,宿主分页读取该文件需要它自己的 generation 和 已读字节数,列表只给主文件的值。
xiaoyumuxi
marked this pull request as ready for review
December 1, 2026 04:32
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 2 flags
Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
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.
关联 Issue
Refs 1lck/Lithe-IDEA#2491
问题与修复
#240 让
agentSessions.page必须带上generation,但generation只在agentSessions.list的会话上给出,而且是会话主文件的值。搜索命中可能落在子代理文件里,宿主拿不到该文件的generation,从命中处分页读取会一直回答changed。agentSessions.search的每个命中新增generation和readBytes,都是命中所在文件的值(files.generation与files.cursor_offset)。generation置零。API 与兼容性
agentSessions.search的命中新增generation、readBytes只新增回答字段,在
agents0 内;旧宿主忽略即可。没有新增宿主方法、通知、错误码或能力版本,插件与 SDK 不受影响。验证
cargo test -p lithe-agent-sessions -p lithe-agent-runtime:45 + 36 项通过。cargo clippy -p lithe-agent-sessions --all-targets -D warnings、cargo fmt:通过。node shared/plugins/scripts/verify-docs.mjs:通过。