mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
[Condense] Add condense button to expanded task view (#4110)
This commit is contained in:
parent
337b5dac88
commit
3139971f4a
1 changed files with 12 additions and 7 deletions
|
|
@ -58,6 +58,16 @@ const TaskHeader = ({
|
|||
|
||||
const { width: windowWidth } = useWindowSize()
|
||||
|
||||
const condenseButton = (
|
||||
<button
|
||||
title={t("chat:task.condenseContext")}
|
||||
disabled={buttonsDisabled}
|
||||
onClick={() => currentTaskItem && handleCondenseContext(currentTaskItem.id)}
|
||||
className="shrink-0 min-h-[20px] min-w-[20px] p-[2px] cursor-pointer disabled:cursor-not-allowed opacity-85 hover:opacity-100 bg-transparent border-none rounded-md">
|
||||
<FoldVertical size={16} />
|
||||
</button>
|
||||
)
|
||||
|
||||
return (
|
||||
<div className="py-2 px-3">
|
||||
<div
|
||||
|
|
@ -107,13 +117,7 @@ const TaskHeader = ({
|
|||
: undefined
|
||||
}
|
||||
/>
|
||||
<button
|
||||
title={t("chat:task.condenseContext")}
|
||||
disabled={buttonsDisabled}
|
||||
onClick={() => currentTaskItem && handleCondenseContext(currentTaskItem.id)}
|
||||
className="shrink-0 min-h-[20px] min-w-[20px] p-[2px] cursor-pointer disabled:cursor-not-allowed opacity-85 hover:opacity-100 bg-transparent border-none rounded-md">
|
||||
<FoldVertical size={16} />
|
||||
</button>
|
||||
{condenseButton}
|
||||
{!!totalCost && <VSCodeBadge>${totalCost.toFixed(2)}</VSCodeBadge>}
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -158,6 +162,7 @@ const TaskHeader = ({
|
|||
: undefined
|
||||
}
|
||||
/>
|
||||
{condenseButton}
|
||||
</div>
|
||||
)}
|
||||
<div className="flex justify-between items-center h-[20px]">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue