Repository navigation
fix(integrations): read a missing token estimate as unavailable, not zero #2006
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
hidb4ai
merged 2 commits into
oceanbase:master
from
kragent66-glitch:fix/1926-missing-token-estimates
Oct 19, 2026
Merged
Changes from all commits
Commits
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
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
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
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] 同一代理在 OpenCode 侧仍是旧逻辑,三个宿主从此显示不同的值
本 PR 只改了两个 Python 宿主,但这段代理还有第三份实现,且两份被改文件的 docstring 明写"Render the same two-window compression proxy used by OpenCode"。OpenCode 侧仍然是
reductionOf(value) = tokenTotals(value)?.token_reduction(integrations/opencode/plugins/powercontext/src/tui.tsx:124),并同步编译进integrations/opencode/plugins/powercontext/lib/tui.js:2157。后果:同一个
recall.estimator: null+ 全零 totals 的响应,Claude Code 与 Codex 现在渲染no data today · no data in 30d,OpenCode 仍渲染saved 0 today · saved 0 in 30d。也就是说本 PR 修掉的是"缺估算被当成 0",但用户换宿主仍会看到被当成 0 的那一版,两个宿主之间也第一次出现同 payload 不同文案。issue #1926 只列了这两个文件,所以这不是本 PR 的范围错误;建议二选一:顺手把
measuredReduction等价逻辑加到 OpenCode 的src与lib(lib/tui.js是提交进仓库的构建产物,两处都要改),或在本 PR 内明确记录一个后续 issue,避免这份代理继续分叉。另:
test_a_window_without_estimates_reads_as_unavailable_not_zero断言的是_stats(0)仍渲染saved 0,这与comparable_preparations > 0的分界一致,覆盖到位。