Skip to content

chore: shared formatTokens util#664

Merged
open-agents-bot[bot] merged 4 commits intomainfrom
ws/17b1817b
Apr 10, 2026
Merged

chore: shared formatTokens util#664
open-agents-bot[bot] merged 4 commits intomainfrom
ws/17b1817b

Conversation

@open-agents-bot
Copy link
Copy Markdown
Contributor

Summary

Extracts the token count formatting logic into a shared utility function to reduce code duplication across components and improve maintainability.

Changes

Components (apps/web/app/)

  • Remove duplicate token formatting logic from session-chat-content.tsx
  • Remove duplicate token formatting logic from leaderboard-section.tsx
  • Remove duplicate token formatting logic from settings/profile/page.tsx
  • Remove duplicate token formatting logic from settings/usage-section.tsx
  • Remove duplicate token formatting logic from settings/usage/domain-usage-leaderboard-section.tsx
  • Remove duplicate token formatting logic from settings/usage/usage-insights-section.tsx
  • Remove duplicate token formatting logic from contribution-chart.tsx

Shared Utilities (packages/shared/lib/)

  • Add comprehensive test coverage for formatTokens utility in tool-state.test.ts
  • Update tool-state.ts with centralized token formatting implementation

Chat - Built with guidance from Will Sather

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
open-agents Ready Ready Preview Apr 10, 2026 5:06pm

Comment thread packages/shared/lib/tool-state.ts Outdated
@open-agents-bot open-agents-bot bot merged commit 1ea5e85 into main Apr 10, 2026
10 checks passed
@open-agents-bot open-agents-bot bot deleted the ws/17b1817b branch April 10, 2026 17:37
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