Properly hide cache section of task header (#2884)

This commit is contained in:
Chris Estreich 2025-04-23 11:41:06 -07:00 committed by GitHub
parent a08461a655
commit b421636a2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 17 deletions

View file

@ -0,0 +1,5 @@
---
"roo-cline": patch
---
Properly hide cache section of task header

View file

@ -155,23 +155,25 @@ const TaskHeader = ({
{!totalCost && <TaskActions item={currentTaskItem} />}
</div>
{doesModelSupportPromptCache && (cacheReads || cacheWrites) && (
<div className="flex items-center gap-1 flex-wrap h-[20px]">
<span className="font-bold">{t("chat:task.cache")}</span>
{typeof cacheWrites === "number" && cacheWrites > 0 && (
<span className="flex items-center gap-0.5">
<CloudUpload size={16} />
{formatLargeNumber(cacheWrites)}
</span>
)}
{typeof cacheReads === "number" && cacheReads > 0 && (
<span className="flex items-center gap-0.5">
<CloudDownload size={16} />
{formatLargeNumber(cacheReads)}
</span>
)}
</div>
)}
{doesModelSupportPromptCache &&
((typeof cacheReads === "number" && cacheReads > 0) ||
(typeof cacheWrites === "number" && cacheWrites > 0)) && (
<div className="flex items-center gap-1 flex-wrap h-[20px]">
<span className="font-bold">{t("chat:task.cache")}</span>
{typeof cacheWrites === "number" && cacheWrites > 0 && (
<span className="flex items-center gap-0.5">
<CloudUpload size={16} />
{formatLargeNumber(cacheWrites)}
</span>
)}
{typeof cacheReads === "number" && cacheReads > 0 && (
<span className="flex items-center gap-0.5">
<CloudDownload size={16} />
{formatLargeNumber(cacheReads)}
</span>
)}
</div>
)}
{!!totalCost && (
<div className="flex justify-between items-center h-[20px]">