Skip to content

Add chat session token usage #8619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Add chat session token usage #8619

wants to merge 7 commits into from

Conversation

timtmok
Copy link
Contributor

@timtmok timtmok commented Jul 22, 2025

Address #8472

Adds a container above the chat input for displaying total token usage. A preference listener was added so that the chat view can re-render the token usage for messages and session.

The echo model has also been fixed. It would only return the beginning of the message history. It returns the second last message (the last item is the context).

A couple of e2e tests have been added for basic checks.

image

Release Notes

New Features

Bug Fixes

  • N/A

QA Notes

I assume no other Assistant tests send multiple messages to the echo provider. But this should be possible now and it will echo the message that was sent.

Copy link

github-actions bot commented Jul 22, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

@timtmok timtmok force-pushed the 8472-chat-session-usage branch 2 times, most recently from be5d729 to 1d8585d Compare July 23, 2025 15:42
timtmok added 6 commits July 23, 2025 16:10
Updates chat history when setting changes
Fix echo model echoing the first message on subsequent responses
@timtmok timtmok force-pushed the 8472-chat-session-usage branch from 3f67dc8 to 2a1e1c3 Compare July 23, 2025 20:10
@timtmok timtmok marked this pull request as ready for review July 23, 2025 20:52
@timtmok timtmok requested a review from sharon-wang July 23, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant