Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Schrolli91
Copy link

@Schrolli91 Schrolli91 commented Jan 28, 2026

Context

Improved cost display in KiloCode Extension: For costs above $0.05, keep 2 decimal places. For lower costs, show 4 decimal places to better see small amounts.. Affects all relevant components (KiloTaskHeader, TaskItemFooter, CondensationResultRow, TaskHeader).

Implementation

  • Added new function formatCost in costFormatting.ts:
    (cost === 0 || cost > 0.05) ? cost.toFixed(2) : cost.toFixed(4);.

  • Replaced all toFixed(2) calls with formatCost(...).

  • Tests edited as well.

No breaking changes.

Screenshots

None

How to Test

  • Start extension and run a task with API provider (e.g. small request for cost <0.05 USD).
  • Check task header and history: Small costs show 4 decimals (e.g. $0.0023), larger 2 (e.g. $1.23).

@changeset-bot
Copy link

changeset-bot bot commented Jan 28, 2026

⚠️ No Changeset found

Latest commit: c7e2fcf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Bastian Schroll and others added 6 commits January 28, 2026 14:00
$0 will stay at 2 decimal points now
Update renders cost information test and add one for the zero amount case and one for the high amount case
Update renders cost information test and add one for the zero amount case and one for the high amount case
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