Skip to content

Port live timer + token counter for TUI (revive PR #20220 / issue #10739) #2

Description

@axisrow

Summary

Port PR anomalyco#20220 ("feat(tui): live per-message response timing") into this fork and rebuild the local binary.

Background

Upstream isn't going to pick this up on its own; tracking it here to apply locally.

Scope

  1. Port the elapsed-time logic from PR feat(tui): live per-message response timing anomalyco/opencode#20220 onto the current packages/opencode/src/cli/cmd/tui/routes/session/index.tsx (the PR's base has since diverged).
  2. Extend it with a live token counter (↑ input / ↓ output, using existing step-finish part data), so a frozen counter next to a running timer is a visible signal that the stream died — see kimi-k3 sessions hang indefinitely with no visible indication #1 in this fork.
  3. Rebuild the local binary and verify against a real kimi-k3 session.

Acceptance

  • While a turn is in progress: elapsed time updates every ~1s, stops on completion.
  • Token counts (↑/↓) update as step-finish parts arrive during streaming.
  • bun test and tsc --noEmit pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions