Repository navigation
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Nowaker
added a commit
to Nowaker/opencode
that referenced
this pull request
Oct 4, 2026
17dca85 adds turn_timing.time / turn_timing.duration to tui.json and the /turn-times and /turn-durations toggles, so every assistant turn can show when it finished and how long it took, and the final turn also keeps the total since the prompt. Defaults stay as upstream. Offered upstream as issue anomalyco#53192 and PR anomalyco#53195. AI-Tool: opencode 1.18.33-vt-60-2fa3363c92 AI-Model: anthropic/claude-opus-5-5 AI-Variant: high AI-Platform: linux AI-Harness: Vibeterm e8a11eb AI-Session-ID: ses_ef81c1485ffeC5Sb59U9mVI77g
The assistant footer only appears on the final message of a prompt and shows one number: the time since that prompt. Intermediate tool-call turns show no footer, so there is no way to see when a turn finished or which step of a long run took the time. Add a `turn_timing` option to tui.json with two independent booleans: - `time`: when each assistant turn finished, as the time of day if today and the date followed by the time otherwise (Locale.todayTimeOrDateFirst, e.g. `10/4/2026 11:26 PM`). Locale.todayTimeOrDateTime keeps its time-then-date order for its existing callers. - `duration`: how long each turn took (created -> completed). The final turn keeps the existing total since the prompt and labels it `total`, so both numbers are visible. Either option gives every completed assistant turn a footer. Both default to false, so the footer is unchanged unless enabled. /turn-times and /turn-durations (also in the command palette and bindable via session_toggle_turn_time / session_toggle_turn_duration) toggle them at runtime. Like /timestamps, a toggled value persists in kv.json and takes precedence over tui.json, which supplies the default.
Nowaker
force-pushed
the
tui-turn-timing
branch
from
October 5, 2026 10:16
2fda6d8 to
b14b75e
Compare
Nowaker
added a commit
to Nowaker/opencode
that referenced
this pull request
Oct 5, 2026
A turn that did not finish today rendered `11:26 PM · 10/4/2026` because the footer reused Locale.todayTimeOrDateTime, whose datetime form is time first. It now uses Locale.todayTimeOrDateFirst and reads `10/4/2026 11:26 PM`; today's turns stay time-only. todayTimeOrDateTime keeps its order for /timestamps and `opencode session list`. The same change is folded into the feature commit on tui-turn-timing (PR anomalyco#53195). AI-Tool: opencode 1.18.33-vt-60-2fa3363c92 AI-Model: anthropic/claude-opus-5-5 AI-Variant: high AI-Platform: linux AI-Harness: Vibeterm e8a11eb AI-Session-ID: ses_ef81c1485ffeC5Sb59U9mVI77g
Nowaker
added a commit
to Nowaker/opencode
that referenced
this pull request
Oct 5, 2026
d80de8e renders a turn that did not finish today as `10/4/2026 11:26 PM` rather than `11:26 PM · 10/4/2026`, on user feedback; the same change is amended into PR anomalyco#53195's head b14b75e. Desktop and m4max installed 1.18.34-vt-91-907b3bc518. AI-Tool: opencode 1.18.33-vt-60-2fa3363c92 AI-Model: anthropic/claude-opus-5-5 AI-Variant: high AI-Platform: linux AI-Harness: Vibeterm e8a11eb AI-Session-ID: ses_ef81c1485ffeC5Sb59U9mVI77g
This was referenced Oct 7, 2026
Open
Nowaker
force-pushed
the
tui-turn-timing
branch
from
October 7, 2026 11:13
b14b75e to
631a271
Compare
This was referenced Oct 8, 2026
Member
|
This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2. — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
Nowaker
added a commit
to Nowaker/opencode
that referenced
this pull request
Oct 11, 2026
17dca85 adds turn_timing.time / turn_timing.duration to tui.json and the /turn-times and /turn-durations toggles, so every assistant turn can show when it finished and how long it took, and the final turn also keeps the total since the prompt. Defaults stay as upstream. Offered upstream as issue anomalyco#53192 and PR anomalyco#53195. AI-Tool: opencode 1.18.33-vt-60-2fa3363c92 AI-Model: anthropic/claude-opus-5-5 AI-Variant: high AI-Platform: linux AI-Harness: Vibeterm e8a11eb AI-Session-ID: ses_ef81c1485ffeC5Sb59U9mVI77g
Nowaker
added a commit
to Nowaker/opencode
that referenced
this pull request
Oct 11, 2026
A turn that did not finish today rendered `11:26 PM · 10/4/2026` because the footer reused Locale.todayTimeOrDateTime, whose datetime form is time first. It now uses Locale.todayTimeOrDateFirst and reads `10/4/2026 11:26 PM`; today's turns stay time-only. todayTimeOrDateTime keeps its order for /timestamps and `opencode session list`. The same change is folded into the feature commit on tui-turn-timing (PR anomalyco#53195). AI-Tool: opencode 1.18.33-vt-60-2fa3363c92 AI-Model: anthropic/claude-opus-5-5 AI-Variant: high AI-Platform: linux AI-Harness: Vibeterm e8a11eb AI-Session-ID: ses_ef81c1485ffeC5Sb59U9mVI77g
Nowaker
added a commit
to Nowaker/opencode
that referenced
this pull request
Oct 11, 2026
d80de8e renders a turn that did not finish today as `10/4/2026 11:26 PM` rather than `11:26 PM · 10/4/2026`, on user feedback; the same change is amended into PR anomalyco#53195's head b14b75e. Desktop and m4max installed 1.18.34-vt-91-907b3bc518. AI-Tool: opencode 1.18.33-vt-60-2fa3363c92 AI-Model: anthropic/claude-opus-5-5 AI-Variant: high AI-Platform: linux AI-Harness: Vibeterm e8a11eb AI-Session-ID: ses_ef81c1485ffeC5Sb59U9mVI77g
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note: I'm aware v1 is now the maintenance branch and new features go to v2 only. This PR is here for others who want to use it on v1. I will submit a v2 version once I've migrated my plugin setup to v2.
Issue for this PR
Closes #53192
Type of change
What does this PR do?
Today the assistant footer appears only on the final message of a prompt, and it shows only the total since that prompt. Intermediate tool-call turns get no footer, so you can't tell when a turn finished or which step took the time.
This adds
turn_timingtotui.jsonas two booleans, both defaulting tofalse, so the UI is unchanged unless you enable them:time: the turn'stime.completed: time of day if today, otherwise the date followed by the time (10/4/2026 11:26 PM). This uses a newLocale.todayTimeOrDateFirst, soLocale.todayTimeOrDateTimekeeps its time-then-date order for/timestampsandopencode session list.duration:completed - createdfor each turn. The final turn keeps the existing total since the prompt and labels ittotal, so both numbers are shown.When either option is on, every completed assistant turn gets the footer. Otherwise the existing condition (last, final, or interrupted) still applies.
/turn-timesand/turn-durationstoggle the two options at runtime. They also appear in the palette and can be bound viasession_toggle_turn_time/session_toggle_turn_duration, with no default keys. As with/timestamps, a toggled value persists inkv.json, andtui.jsononly supplies the default.I made these two settings rather than a mode enum because the two pieces of information are independent. Some people only want the clock time, others only want to know where the time went.
Docs:
tui.mdxoptions list and example config.How did you verify your code works?
bun typecheckinpackages/tuiandpackages/opencode.loads turn timing configinpackages/opencode/test/config/tui.test.tspasses. Four plugin-merge tests in that file fail ondevwith or without this change.Before (
dev, and this branch with defaults; identical):After
/turn-timesand/turn-durations:A turn from yesterday puts the date first; today's turns stay time-only (row shifted back 24h in a scratch DB):
Time only:
With
{"turn_timing":{"duration":true}}intui.json, no kv override, and a restart, durations show from the start. The toggled kv value also persisted across the restart.Screenshots / recordings
Terminal captures above.
Checklist
This PR is AI generated, but under direct supervision and on request of @Nowaker.