cli: opencode stats reports no tool calls when all calls are still running

オープン 初心者向け
#64,631 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
bun, typescript
領域
cli

調査の方向性

まず opencode stats のデフォルトカードの処理を追い、詳細ビューおよび JSON ビューと呼び出しの数え方を比較します。ペイロードにはソースファイルやテストの指定はありません。未完了のツール呼び出しを1件だけ使って再現し、カードに呼び出しが1件と表示される一方で、成功率は利用不可のままであることを確認します。その後、呼び出し前は引き続き呼び出しなしと表示され、完了後は成功率が100.0%と表示されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

area/cli platform/windows type/bug version/v2
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
  1. 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.
  2. Before the call finishes, compare opencode stats --project . --days 1, the same command with --tools, and with --json.
  3. The card says no tool calls; the detail view says 0 finished calls · 1 unfinished; JSON reports calls: 1 and unfinished: 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分
マージ済み PR(30日)
498

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。