Skip to content

Commit 5307cc7

Browse files
committed
refactor: Improve event listener handling and optimize task header component
1 parent 4fe0b3c commit 5307cc7

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

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

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

124124
const isCostAvailable = useMemo(() => {
125-
return (
126-
apiConfiguration?.apiProvider !== "openai" &&
127-
apiConfiguration?.apiProvider !== "ollama" &&
128-
apiConfiguration?.apiProvider !== "lmstudio" &&
129-
apiConfiguration?.apiProvider !== "gemini"
130-
)
131-
}, [apiConfiguration?.apiProvider])
125+
return totalCost > 0
126+
}, [totalCost])
132127

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

0 commit comments

Comments
 (0)