cli: opencode stats reports no tool calls when all calls are still running
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 70/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- bun, typescript
- 领域
- cli
调研方向
首先追踪 opencode stats 的默认卡片,并比较它与详细视图和 JSON 视图统计调用次数的方式;有效负载未指定源文件或测试。通过一个未完成的工具调用复现,并检查卡片是否报告一次调用,同时成功率仍不可用;然后确认在任何调用发生前,它仍报告没有调用,而调用完成后则报告成功率为 100.0%。
由索引模型根据 Issue 内容生成。
描述
Description
When the only tool call in the selected range is still running, the default opencode stats card says no tool calls. The detailed and JSON views correctly count that call. A success rate is not available yet, but that is different from zero calls.
Steps to reproduce
- Use a fresh project that has a single pending tool call, for example a question waiting for a reply, and no completed or failed calls in the range.
- Before the call finishes, compare
opencode stats --project . --days 1, the same command with--tools, and with--json. - The card says
no tool calls; the detail view says0 finished calls · 1 unfinished; JSON reportscalls: 1andunfinished: 1.
Verified with the production Core projector and stats collector in an in-memory database. A loopback fixture replayed their outputs to the unmodified CLI, which printed the same discrepancy in 3/3 runs. Controls: before the call the card correctly reported no calls; after successful completion it reported 100.0% tool success. No live provider or user database was involved.
OpenCode version
V2 dev at 22377659a8ed223f3eebc86660dd1a5bc2b33ca5 (2.3.0).
Operating System
Windows 11 x64, Bun 1.4.4.
Terminal
CLI subprocess with captured stdout; no TUI or third-party plugins.
- 主要语言
- TypeScript
- 星标
- 227k
- 派生
- 30.7k
- 平均合并
- 4 小时 35 分钟
- 30 天内合并 PR
- 498
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
area/desktop platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 78/100
anomalyco/opencode#64566 · 1 条评论 ·
维护者通常 1 天内回复
-
area/desktop platform/windows status/repro-plausible type/bug version/v2
难度 2/5 1-3 小时 新手友好度 64/100
anomalyco/opencode#64522 · 1 条评论 ·
维护者通常 1 天内回复
-
opencode-native panics on session ID after a multibyte character可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area/tui platform/macos status/repro-plausible type/bug version/v2
难度 2/5 1-3 小时 新手友好度 79/100
anomalyco/opencode#64389 · 1 条评论 ·
维护者通常 1 天内回复
-
cli: plugin list shows - for ID of TUI-only plugins configured in cli.json可能已有人在做 @yash-alla 于 1 天前认领。 未关闭area/cli platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#64175 · 1 条评论 ·
维护者通常 1 天内回复
-
area/desktop platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#64077 · 3 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
ai-driven-qa bug claude Cosmetic
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Domain / chatbot New
难度 2/5 1-3 小时 新手友好度 65/100
Inist-CNRS/lodex#3861 ·
维护者通常 1 天内回复
-
area:agent-sdk area:docs documentation enhancement
难度 2/5 1-3 小时 新手友好度 66/100
anthropics/claude-code#110914 ·
-
approved check:passed streams:remove
难度 1/5 1 小时以内 新手友好度 62/100
维护者通常 1 天内回复