Repository navigation
feat(chat): show how long a turn takes - #487
Merged
Merged
Conversation
Contributor
|
🎉 This PR is included in version 0.63.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
A turn now shows how long it has been running and how long it took. A live counter sits next to the status text in the transcript bubble (for example
Starting ubuntu-desktop (...)... 42s), and the status bar gains atimestat that ticks during the turn and keeps the final duration until the next turn starts.Changes
frontend/lib/transcript.ts-ChatStatetracksturnStartedAtandlastTurnMs. A turn starts onuserSendorRunStartedand ends onDoneorCancelled. The reducer takesnowas an argument so it stays pure.frontend/lib/elapsed.ts-formatElapsed(8s,1m 12s,1h 03m).frontend/hooks/useNow.ts- one-second ticking clock for the two displays.frontend/store.tsx- passes the clock into the reducer and exposes the active chat's turn timing.frontend/components/Transcript.tsx,frontend/components/StatusBar.tsx- render the elapsed time in its own element. The status label is unchanged.Timing is wall time and includes time spent waiting on an approval. A follow-up sent mid-run does not restart it. Durations are not persisted across a conversation reload, the same as token usage.
No backend change. Affected repos:
desktoponly. Docs follow-up: inference-gateway/docs#1159.