Skip to content

feat(ai): Display token count in agent usage footer#12628

Open
GabVS15 wants to merge 1 commit into
warpdotdev:masterfrom
GabVS15:GabVS15/agent-token-count-display
Open

feat(ai): Display token count in agent usage footer#12628
GabVS15 wants to merge 1 commit into
warpdotdev:masterfrom
GabVS15:GabVS15/agent-token-count-display

Conversation

@GabVS15

@GabVS15 GabVS15 commented Jun 14, 2026

Copy link
Copy Markdown

Description

Closes #12627

Adds token usage display to the AI agent conversation footer. Previously, the usage button only showed credits spent. Now it also shows the total token count for the conversation, both in the compact usage pill and in the expanded usage details panel.

Before:

3.5 credits ›

After (compact pill):

3.5 credits · 1247 tok ›

After (expanded details panel):

USAGE SUMMARY
Credits spent (total)   3.5 credits
Tool calls              2 calls
Tokens                  1247 tok     ← new
Models                  claude-...
Context window used     12%

Linked Issue

Changes

  • app/src/ai/blocklist/view_util.rs — added format_token_count() utility function
  • app/src/ai/blocklist/block/view_impl/output.rs — appends token count to the compact usage pill
  • app/src/ai/blocklist/usage/conversation_usage_view.rs — adds a "Tokens" row in the expanded usage details panel
  • app/src/ai/blocklist/view_util_tests.rs — unit tests for format_token_count

Testing

  • I have manually tested my changes locally with ./script/run

Show total token usage alongside credits in the AI agent conversation
footer, both in the compact usage pill and in the expanded details panel.
@cla-bot

cla-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @GabVS15 on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jun 14, 2026
@oz-for-oss

oz-for-oss Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

@GabVS15

Every PR must be linked to a same-repo issue before Oz can review it.

This PR is linked to #12627, but no linked issue is marked ready-to-implement yet. Only repository maintainers apply that label, so please wait for a maintainer to mark the issue. Once it is marked, push a new commit or comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GabVS15

Every PR must be linked to a same-repo issue before Oz can review it.

This PR is linked to #12627, but no linked issue is marked ready-to-implement yet. Only repository maintainers apply that label, so please wait for a maintainer to mark the issue. Once it is marked, push a new commit or comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

@GabVS15

GabVS15 commented Jun 14, 2026

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot

cla-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @GabVS15 on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@cla-bot

cla-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@GabVS15

GabVS15 commented Jun 14, 2026

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Jun 14, 2026
@cla-bot

cla-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Show token count in AI agent usage footer

1 participant