@@ -262,16 +262,16 @@ function QKTracingContent({
262262} : QKTracingContentProps ) {
263263 return (
264264 < div className = "flex flex-col gap-6" >
265- { /* Q and K Marginal Contributors */ }
265+ { /* K and Q Marginal Contributors */ }
266266 < div className = "flex gap-4 min-h-0" >
267267 < div className = "flex flex-col w-1/2 gap-2 min-h-0" >
268268 < div className = "font-semibold tracking-tight flex items-center text-sm text-slate-700 gap-1 cursor-default shrink-0" >
269- < span > Q MARGINAL</ span >
269+ < span > K MARGINAL</ span >
270270 </ div >
271271 < div className = "flex flex-col gap-1.5 overflow-y-auto no-scrollbar max-h-64" >
272- { results . topQMarginalContributors . map ( ( [ nodeId , score ] , idx ) => (
272+ { results . topKMarginalContributors . map ( ( [ nodeId , score ] , idx ) => (
273273 < div
274- key = { `q -${ nodeId } -${ idx } ` }
274+ key = { `k -${ nodeId } -${ idx } ` }
275275 className = { cn (
276276 'py-2 px-3 border rounded cursor-pointer transition-colors bg-gray-50 border-gray-200 flex justify-between items-center' ,
277277 nodeId === hoveredId && 'ring-2 ring-blue-300' ,
@@ -292,12 +292,12 @@ function QKTracingContent({
292292
293293 < div className = "flex flex-col w-1/2 gap-2 min-h-0" >
294294 < div className = "font-semibold tracking-tight flex items-center text-sm text-slate-700 gap-1 cursor-default shrink-0" >
295- < span > K MARGINAL</ span >
295+ < span > Q MARGINAL</ span >
296296 </ div >
297297 < div className = "flex flex-col gap-1.5 overflow-y-auto no-scrollbar max-h-64" >
298- { results . topKMarginalContributors . map ( ( [ nodeId , score ] , idx ) => (
298+ { results . topQMarginalContributors . map ( ( [ nodeId , score ] , idx ) => (
299299 < div
300- key = { `k -${ nodeId } -${ idx } ` }
300+ key = { `q -${ nodeId } -${ idx } ` }
301301 className = { cn (
302302 'py-2 px-3 border rounded cursor-pointer transition-colors bg-gray-50 border-gray-200 flex justify-between items-center' ,
303303 nodeId === hoveredId && 'ring-2 ring-blue-300' ,
@@ -332,18 +332,17 @@ function QKTracingContent({
332332 < div
333333 className = { cn (
334334 'flex-1 min-w-0 cursor-pointer px-3 py-2 transition-colors flex items-center gap-2' ,
335- qId === hoveredId ? 'bg-black/5' : 'hover:bg-black/5' ,
336- qId === clickedId &&
335+ kId === hoveredId ? 'bg-black/5' : 'hover:bg-black/5' ,
336+ kId === clickedId &&
337337 'bg-blue-100/50 shadow-[inset_0_0_0_1px_#3b82f6]' ,
338338 ) }
339- onClick = { ( e ) => onNodeClick ( qId , e . metaKey || e . ctrlKey ) }
340- onMouseEnter = { ( ) => onNodeHover ( qId ) }
339+ onMouseEnter = { ( ) => onNodeHover ( kId ) }
341340 onMouseLeave = { ( ) => onNodeHover ( null ) }
342341 >
343342 < span className = "text-xs font-bold text-slate-400 shrink-0" >
344- Q :
343+ K :
345344 </ span >
346- { renderNodeLabel ( qId ) }
345+ { renderNodeLabel ( kId ) }
347346 </ div >
348347
349348 < div className = "flex items-center justify-center shrink-0 px-2" >
@@ -353,17 +352,18 @@ function QKTracingContent({
353352 < div
354353 className = { cn (
355354 'flex-1 min-w-0 cursor-pointer px-3 py-2 transition-colors flex items-center gap-2' ,
356- kId === hoveredId ? 'bg-black/5' : 'hover:bg-black/5' ,
357- kId === clickedId &&
355+ qId === hoveredId ? 'bg-black/5' : 'hover:bg-black/5' ,
356+ qId === clickedId &&
358357 'bg-blue-100/50 shadow-[inset_0_0_0_1px_#3b82f6]' ,
359358 ) }
360- onMouseEnter = { ( ) => onNodeHover ( kId ) }
359+ onClick = { ( e ) => onNodeClick ( qId , e . metaKey || e . ctrlKey ) }
360+ onMouseEnter = { ( ) => onNodeHover ( qId ) }
361361 onMouseLeave = { ( ) => onNodeHover ( null ) }
362362 >
363363 < span className = "text-xs font-bold text-slate-400 shrink-0" >
364- K :
364+ Q :
365365 </ span >
366- { renderNodeLabel ( kId ) }
366+ { renderNodeLabel ( qId ) }
367367 </ div >
368368
369369 < div className = "text-right flex flex-col justify-center items-end px-3 shrink-0 border-l border-black/5 bg-white/30" >
0 commit comments