Skip to content

Commit e9da44d

Browse files
committed
fix: Enhance totalCost validation in TaskHeader component
1 parent 5307cc7 commit e9da44d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webview-ui/src/components/chat/TaskHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
122122
}, [task.text, windowWidth])
123123

124124
const isCostAvailable = useMemo(() => {
125-
return totalCost > 0
125+
return totalCost !== null && totalCost !== undefined && totalCost > 0 && !isNaN(totalCost)
126126
}, [totalCost])
127127

128128
const shouldShowPromptCacheInfo = doesModelSupportPromptCache && apiConfiguration?.apiProvider !== "openrouter"

0 commit comments

Comments
 (0)