@@ -18,7 +18,7 @@ import { vscode } from "@src/utils/vscode"
18
18
import { removeLeadingNonAlphanumeric } from "@src/utils/removeLeadingNonAlphanumeric"
19
19
import { getLanguageFromPath } from "@src/utils/getLanguageFromPath"
20
20
import { formatTokenStats } from "@src/utils/formatTokens"
21
- import { Button } from "@src/components/ui"
21
+ import { Button , StandardTooltip } from "@src/components/ui"
22
22
23
23
import { ToolUseBlock , ToolUseBlockHeader } from "../common/ToolUseBlock"
24
24
import UpdateTodoListToolBlock from "./UpdateTodoListToolBlock"
@@ -1146,36 +1146,39 @@ export const ChatRowContent = ({
1146
1146
{ title }
1147
1147
</ span >
1148
1148
< div style = { { display : "flex" , alignItems : "center" , gap : "8px" , flexShrink : 0 } } >
1149
- < VSCodeBadge
1150
- style = { {
1151
- opacity : cost !== null && cost !== undefined && cost > 0 ? 1 : 0 ,
1152
- flexShrink : 0 ,
1153
- } } >
1154
- ${ Number ( cost || 0 ) ?. toFixed ( 4 ) }
1155
- </ VSCodeBadge >
1156
- { hasTokenData && (
1157
- < div
1158
- className = "flex items-center gap-1"
1149
+ { hasTokenData ? (
1150
+ < StandardTooltip
1151
+ content = {
1152
+ < div className = "flex flex-col gap-1" >
1153
+ < div className = "flex items-center gap-2" >
1154
+ < span > ↑ Input:</ span >
1155
+ < span className = "font-mono" > { tokenStats . input } </ span >
1156
+ </ div >
1157
+ < div className = "flex items-center gap-2" >
1158
+ < span > ↓ Output:</ span >
1159
+ < span className = "font-mono" > { tokenStats . output } </ span >
1160
+ </ div >
1161
+ </ div >
1162
+ }
1163
+ side = "top" >
1164
+ < VSCodeBadge
1165
+ style = { {
1166
+ opacity :
1167
+ cost !== null && cost !== undefined && cost > 0 ? 1 : 0 ,
1168
+ flexShrink : 0 ,
1169
+ cursor : "default" ,
1170
+ } } >
1171
+ ${ Number ( cost || 0 ) ?. toFixed ( 4 ) }
1172
+ </ VSCodeBadge >
1173
+ </ StandardTooltip >
1174
+ ) : (
1175
+ < VSCodeBadge
1159
1176
style = { {
1160
- opacity : hasTokenData ? 1 : 0 ,
1177
+ opacity : cost !== null && cost !== undefined && cost > 0 ? 1 : 0 ,
1161
1178
flexShrink : 0 ,
1162
- whiteSpace : "nowrap" ,
1163
1179
} } >
1164
- < span
1165
- style = { {
1166
- fontSize : "12px" ,
1167
- color : "var(--vscode-descriptionForeground)" ,
1168
- } } >
1169
- ↑ { tokenStats . input }
1170
- </ span >
1171
- < span
1172
- style = { {
1173
- fontSize : "12px" ,
1174
- color : "var(--vscode-descriptionForeground)" ,
1175
- } } >
1176
- ↓ { tokenStats . output }
1177
- </ span >
1178
- </ div >
1180
+ ${ Number ( cost || 0 ) ?. toFixed ( 4 ) }
1181
+ </ VSCodeBadge >
1179
1182
) }
1180
1183
</ div >
1181
1184
</ div >
0 commit comments