feat(panel): unify token breakdown order and flatten tooltip cards

This commit is contained in:
fish
2026-11-21 00:41:53 +09:00
parent 55320df9b7
commit 6411e49ac4
13 changed files with 200 additions and 95 deletions
@@ -103,6 +103,10 @@ test('FourSegmentBar supports percentage scaling while keeping 100% default for
thinkingTokens: 100,
});
const segsFull = barFull.el.querySelectorAll('.progress-seg');
assert.deepEqual(
segsFull.map((el) => el.className.split(/\s+/).find((c) => c.startsWith('seg-'))),
['seg-input', 'seg-cached', 'seg-thinking', 'seg-output']
);
const sumFull = segsFull.reduce((acc, el) => acc + parsePctVar(el), 0);
assert.ok(Math.abs(sumFull - 100) < 0.05);