feat: add per-conversation duration to Html reports#266
Merged
philipph-askui merged 2 commits intomainfrom Apr 15, 2026
Merged
Conversation
programminx-askui
requested changes
Apr 15, 2026
| conversation_index: int | ||
| conversation_id: str | ||
| step_summaries: list[StepUsageSummary] = Field(default_factory=list) | ||
| duration_seconds: float | None = None |
Collaborator
There was a problem hiding this comment.
Do we not have a times object for duration in Python lib?
Collaborator
There was a problem hiding this comment.
I changed my mind. Please store the start time and end time and generate the duration in the generate function when the html is generated.
Then we have the values also for other information
Collaborator
There was a problem hiding this comment.
And why is this part of the usage tracking?
Should we change the name?
Contributor
Author
There was a problem hiding this comment.
both addressed in #e12eb14b25093833b46467064ccc8fcbe61ae994:
- renamed
UsageTrackingCallbacktoConversationStatisticsCallback - stored
started_atandended_atas datetime objects i/oduration_secondsin theConversationUsageSummary
| return [image] | ||
|
|
||
|
|
||
| def _format_duration(seconds: float) -> str: |
Collaborator
There was a problem hiding this comment.
Would be nice if we have a time object. Then we don't need to implement the format logic by our self
programminx-askui
approved these changes
Apr 15, 2026
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.
Adds the duration of each conversation in the per-conversation usage breakdown of the Html reports