Skip to content

Commit 2e94f9d

Browse files
authored
Merge pull request #2109 from Kilo-Org/christiaan/fix-zero
Fix condition to not show 0 if it's falsy
2 parents 43d6a50 + 173ecf4 commit 2e94f9d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/tricky-kids-fold.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"kilo-code": patch
3+
---
4+
5+
A solitary "0" that was sometimes shown on the Kilo Code and OpenRouter API provider settings page was removed.

webview-ui/src/components/kilocode/settings/KiloModelInfoView.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export const KiloModelInfoView = ({
139139
{model.maxTokens?.toLocaleString() ?? 0}
140140
</div>
141141
</div>
142-
{stats && stats.cost && stats.costPerRequest && model.inputPrice && model.outputPrice && (
142+
{stats && stats.cost && stats.costPerRequest && model.inputPrice && model.outputPrice ? (
143143
<StandardTooltip content={t("kilocode:settings.modelInfo.averageKiloCodeCost")}>
144144
<div className="text-sm text-vscode-descriptionForeground font-medium flex flex-wrap gap-2">
145145
<div className="rounded-full border px-2.5 py-1">{formatPrice(stats.cost)} / M tokens</div>
@@ -148,6 +148,8 @@ export const KiloModelInfoView = ({
148148
</div>
149149
</div>
150150
</StandardTooltip>
151+
) : (
152+
<></>
151153
)}
152154
<Collapsible open={isPricingExpanded} onOpenChange={setIsPricingExpanded}>
153155
<CollapsibleTrigger className="flex items-center gap-1 w-full cursor-pointer hover:opacity-80 mb-2">

0 commit comments

Comments
 (0)