feat(tui): add stats display mode for live thinking - #2921
feat(tui): add stats display mode for live thinking#2921jfwang-moonshot wants to merge 5 commits into
Conversation
Add a thinking_live_display preference in tui.toml. The default "preview" keeps the scrolling two-line tail while thinking streams; "stats" hides the text and shows an approximate token count plus elapsed thinking time, leaving a one-line "Thought for …" summary once thinking finishes.
🦋 Changeset detectedLatest commit: 865384e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c02d8f7cc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Thinking durations are not persisted, so replayed blocks in stats mode finalized with a fabricated "Thought for 0s". Replayed blocks are now marked untimed and render "Thought for a while" instead; live blocks keep the exact elapsed time. Also switch ThinkingComponent to an options bag (mode / ui / liveDisplay / timed), matching the options-object pattern used by other components with multiple configuration knobs.
…ences currentTuiConfig omitted the new field, so any save path that rewrites tui.toml without touching it (/theme, /editor, the update preference, the cache-expiry "never" action) re-serialized the key as "preview" and silently reset a "stats" opt-in.
The chars/4 estimate could not be reconciled with real usage (per-chunk usage is collected by providers but only surfaces at step end), so the live stats line now shows just the exact elapsed time. ctrl+o during a live stats block now falls back to the preview tail, matching preview mode's behavior.
|
建议同步一下 PR 描述(token 估算已在 865384e 移除),"What changed" 可改为:
|
Related Issue
Resolves #287
Problem
What changed
Add a thinking_live_display preference in tui.toml. The default "preview" keeps the scrolling two-line tail while thinking streams; "stats" hides the text and shows the elapsed thinking time instead, leaving a one-line "Thought for …" summary once thinking finishes (Ctrl-O reveals the streaming text in both modes). Replayed thinking has no persisted duration, so those blocks show a plain "Thought for a while" summary instead of a fabricated 0s.
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.