Skip to content

Commit e51c240

Browse files
committed
Fix condition to not show 0 if it's falsy
1 parent af6d0a0 commit e51c240

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)