Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 98d6575

Browse files
committed
fix(firmware): show quota percentage with 2 decimal places
Changed from Math.round() to toFixed(2) for more precise display: - 0.0004 → '0.04% used' (instead of '0% used') - 0.5217 → '52.17% used' (instead of '52% used') Also removed unused VSCodeLink import from Firmware.tsx
1 parent 3ee22fd commit 98d6575

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

webview-ui/src/components/settings/providers/Firmware.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useCallback, useState } from "react"
2-
import { VSCodeTextField, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
2+
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
33

44
import { type OrganizationAllowList, type ProviderSettings, type RouterModels } from "@roo-code/types"
55

@@ -54,9 +54,9 @@ export const Firmware = ({
5454
<label className="block font-medium">{t("settings:providers.apiKey")}</label>
5555
<div className="flex items-center gap-3">
5656
<FirmwareQuotaDisplay />
57-
<VSCodeLink href="https://app.firmware.ai/api-keys">
57+
{/* <VSCodeLink href="https://app.firmware.ai/api-keys">
5858
{t("settings:providers.getApiKey")}
59-
</VSCodeLink>
59+
</VSCodeLink> */}
6060
</div>
6161
</div>
6262
<VSCodeTextField

webview-ui/src/components/settings/providers/FirmwareQuotaDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const FirmwareQuotaDisplay = () => {
1717
return null
1818
}
1919

20-
const percentUsed = Math.round(quota.used * 100)
20+
const percentUsed = (quota.used * 100).toFixed(2)
2121
const resetDate = new Date(quota.reset)
2222
const now = new Date()
2323
const msUntilReset = resetDate.getTime() - now.getTime()

0 commit comments

Comments
 (0)