Record each reply when it ends, and unfinished ones - #3
Merged
Merged
Conversation
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.
Record each reply when it ends, and show interrupted or failed ones. Ships as 0.3.2.
Problem
Turns were only recorded on
session.execution.succeeded. A message sent while a reply is running is queued into the same execution, so the first reply was never recorded; and an execution that ends interrupted or failed recorded nothing. A 19m 53s reply left the previous turn in the sidebar.What changes
stop,lengthorcontent-filterreports its reply, bounded at that step so a queued message after it is excluded. Noterror/unknown, since OpenCode retries steps under the same message id. Each reply reports once (deduped by its last step).session.execution.interruptedand.failedreport the unfinished reply with OpenCode's figures and aninterrupted/failednote; engine reading skipped. OpenCode records no tokens for the stopped step, so a 0 count hides the tokens and speed rows, and unfinished replies are excluded from session speed, trend and time split. History marks the row.Verified live (MTPLX, OpenCode 2.0.12)
interrupted.Note
The queued reply's time (144.81s) differs from OpenCode's label (4m 31s) by design: OpenCode includes the wait behind the previous reply, which would otherwise be counted in both replies.