@@ -154,100 +154,118 @@ const TaskHeader = ({
154154 </ div >
155155 { task . images && task . images . length > 0 && < Thumbnails images = { task . images } /> }
156156
157- < div className = "flex flex-col gap-1" >
158- { contextWindow > 0 && (
159- < div
160- className = { `w-full flex ${ windowWidth < 400 ? "flex-col" : "flex-row" } gap-1 h-auto` } >
161- < div className = "flex items-center gap-1 flex-shrink-0" >
162- < span className = "font-bold" data-testid = "context-window-label" >
163- { t ( "chat:task.contextWindow" ) }
164- </ span >
165- </ div >
166- < ContextWindowProgress
167- contextWindow = { contextWindow }
168- contextTokens = { contextTokens || 0 }
169- maxTokens = {
170- model
171- ? getModelMaxOutputTokens ( {
172- modelId,
173- model,
174- settings : apiConfiguration ,
175- } )
176- : undefined
177- }
178- />
179- { condenseButton }
180- </ div >
181- ) }
157+ < div className = "border-t border-b border-vscode-panel-border/50 py-4 mt-2 mb-1" >
158+ < table className = "w-full" >
159+ < tbody >
160+ { contextWindow > 0 && (
161+ < tr >
162+ < th
163+ className = "font-bold text-left align-top w-1 whitespace-nowrap pl-1 pr-2 h-[24px]"
164+ data-testid = "context-window-label" >
165+ { t ( "chat:task.contextWindow" ) }
166+ </ th >
167+ < td className = "align-top" >
168+ < div
169+ className = { `max-w-64 flex ${ windowWidth < 400 ? "flex-col" : "flex-row" } gap-1 h-auto` } >
170+ < ContextWindowProgress
171+ contextWindow = { contextWindow }
172+ contextTokens = { contextTokens || 0 }
173+ maxTokens = {
174+ model
175+ ? getModelMaxOutputTokens ( {
176+ modelId,
177+ model,
178+ settings : apiConfiguration ,
179+ } )
180+ : undefined
181+ }
182+ />
183+ { condenseButton }
184+ </ div >
185+ </ td >
186+ </ tr >
187+ ) }
182188
183- < div className = "flex items-center gap-1 flex-wrap h-[20px]" >
184- < span className = "font-bold" > { t ( "chat:task.tokens" ) } </ span >
185- { typeof tokensIn === "number" && tokensIn > 0 && (
186- < span className = "flex items-center gap-0.5" >
187- < i className = "codicon codicon-arrow-up text-xs font-bold" / >
188- { formatLargeNumber ( tokensIn ) }
189- </ span >
190- ) }
191- { typeof tokensOut === "number" && tokensOut > 0 && (
192- < span className = "flex items-center gap-0.5" >
193- < i className = "codicon codicon-arrow-down text-xs font-bold" / >
194- { formatLargeNumber ( tokensOut ) }
195- </ span >
196- ) }
197- </ div >
189+ < tr >
190+ < th className = "font-bold text-left align-top w-1 whitespace-nowrap pl-1 pr-2 h-[24px]" >
191+ { t ( "chat:task.tokens" ) }
192+ </ th >
193+ < td className = "align-top" >
194+ < div className = "flex items-center gap-1 flex-wrap" >
195+ { typeof tokensIn === "number" && tokensIn > 0 && (
196+ < span > ↑ { formatLargeNumber ( tokensIn ) } </ span >
197+ ) }
198+ { typeof tokensOut === "number" && tokensOut > 0 && (
199+ < span > ↓ { formatLargeNumber ( tokensOut ) } </ span >
200+ ) }
201+ </ div >
202+ </ td >
203+ </ tr >
198204
199- { ( ( typeof cacheReads === "number" && cacheReads > 0 ) ||
200- ( typeof cacheWrites === "number" && cacheWrites > 0 ) ) && (
201- < div className = "flex items-center gap-1 flex-wrap h-[20px]" >
202- < span className = "font-bold" > { t ( "chat:task.cache" ) } </ span >
203- { typeof cacheWrites === "number" && cacheWrites > 0 && (
204- < span className = "flex items-center gap-0.5" >
205- < CloudUpload size = { 16 } />
206- { formatLargeNumber ( cacheWrites ) }
207- </ span >
205+ { ( ( typeof cacheReads === "number" && cacheReads > 0 ) ||
206+ ( typeof cacheWrites === "number" && cacheWrites > 0 ) ) && (
207+ < tr >
208+ < th className = "font-bold text-left align-top w-1 whitespace-nowrap pl-1 pr-2 h-[24px]" >
209+ { t ( "chat:task.cache" ) }
210+ </ th >
211+ < td className = "align-top" >
212+ < div className = "flex items-center gap-1 flex-wrap" >
213+ { typeof cacheWrites === "number" && cacheWrites > 0 && (
214+ < span className = "flex items-center gap-1" >
215+ < CloudUpload size = { 14 } />
216+ { formatLargeNumber ( cacheWrites ) }
217+ </ span >
218+ ) }
219+ { typeof cacheReads === "number" && cacheReads > 0 && (
220+ < span className = "flex items-center gap-1" >
221+ < CloudDownload size = { 14 } />
222+ { formatLargeNumber ( cacheReads ) }
223+ </ span >
224+ ) }
225+ </ div >
226+ </ td >
227+ </ tr >
208228 ) }
209- { typeof cacheReads === "number" && cacheReads > 0 && (
210- < span className = "flex items-center gap-0.5" >
211- < CloudDownload size = { 16 } />
212- { formatLargeNumber ( cacheReads ) }
213- </ span >
214- ) }
215- </ div >
216- ) }
217229
218- { ! ! totalCost && (
219- < div className = "flex items-center gap-1 h-[20px]" >
220- < span className = "font-bold" > { t ( "chat:task.apiCost" ) } </ span >
221- < span > ${ totalCost ?. toFixed ( 2 ) } </ span >
222- </ div >
223- ) }
230+ { ! ! totalCost && (
231+ < tr >
232+ < th className = "font-bold text-left align-top w-1 whitespace-nowrap pl-1 pr-2 h-[24px]" >
233+ { t ( "chat:task.apiCost" ) }
234+ </ th >
235+ < td className = "align-top" >
236+ < span > ${ totalCost ?. toFixed ( 2 ) } </ span >
237+ </ td >
238+ </ tr >
239+ ) }
224240
225- { /* Cache size display */ }
226- { ( ( typeof cacheReads === "number" && cacheReads > 0 ) ||
227- ( typeof cacheWrites === "number" && cacheWrites > 0 ) ) && (
228- < div className = "flex items-center gap-1 h-[20px]" >
229- < span className = "font-bold" > Cache size</ span >
230- < span className = "text-xs text-vscode-foreground opacity-85" >
231- { prettyBytes ( ( ( cacheReads || 0 ) + ( cacheWrites || 0 ) ) * 4 ) }
232- </ span >
233- </ div >
234- ) }
241+ { /* Cache size display */ }
242+ { ( ( typeof cacheReads === "number" && cacheReads > 0 ) ||
243+ ( typeof cacheWrites === "number" && cacheWrites > 0 ) ) && (
244+ < tr >
245+ < th className = "font-bold text-left align-top w-1 whitespace-nowrap pl-1 pr-2 h-[24px]" >
246+ Cache size
247+ </ th >
248+ < td className = "align-top" >
249+ { prettyBytes ( ( ( cacheReads || 0 ) + ( cacheWrites || 0 ) ) * 4 ) }
250+ </ td >
251+ </ tr >
252+ ) }
235253
236- { /* Size display */ }
237- { ! ! currentTaskItem ?. size && currentTaskItem . size > 0 && (
238- < div className = "flex items-center gap-1 h-[20px]" >
239- < span className = "font-bold" > Size</ span >
240- < span className = "text-xs text-vscode-foreground opacity-85" >
241- { prettyBytes ( currentTaskItem . size ) }
242- </ span >
243- </ div >
244- ) }
254+ { /* Size display */ }
255+ { ! ! currentTaskItem ?. size && currentTaskItem . size > 0 && (
256+ < tr >
257+ < th className = "font-bold text-left align-top w-1 whitespace-nowrap pl-1 pr-2 h-[20px]" >
258+ Size
259+ </ th >
260+ < td className = "align-top" > { prettyBytes ( currentTaskItem . size ) } </ td >
261+ </ tr >
262+ ) }
263+ </ tbody >
264+ </ table >
245265 </ div >
246266
247267 { /* Footer with task management buttons */ }
248- < div
249- className = "border-t border-vscode-panel-border/50 pt-2 mt-2"
250- onClick = { ( e ) => e . stopPropagation ( ) } >
268+ < div onClick = { ( e ) => e . stopPropagation ( ) } >
251269 < TaskActions item = { currentTaskItem } buttonsDisabled = { buttonsDisabled } />
252270 </ div >
253271 </ >
0 commit comments