Skip to content

feat: configure cost display currency#32487

Open
dingskyhi wants to merge 1 commit into
anomalyco:devfrom
dingskyhi:display-currency
Open

feat: configure cost display currency#32487
dingskyhi wants to merge 1 commit into
anomalyco:devfrom
dingskyhi:display-currency

Conversation

@dingskyhi

Copy link
Copy Markdown

Issue for this PR

Closes #32485

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds display.currency, display.cost_currency, and display.currency_rate config for usage cost formatting.

This lets users display costs in currencies like CNY, and lets custom model prices that are already configured in RMB render as RMB without converting again.

How did you verify your code works?

  • bun typecheck in packages/core
  • bun typecheck in packages/tui
  • bun typecheck in packages/app
  • bun typecheck in packages/sdk/js
  • bun test src/cost-display.test.ts in packages/core
  • bun test ./src/components/session/session-context-format.test.ts in packages/app
  • ./packages/sdk/js/script/build.ts
  • Push hook ran bun turbo typecheck successfully

Screenshots / recordings

N/A. This changes cost formatting only; the visible labels keep the same layout.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

[FEATURE]: Configure usage cost display currency

1 participant