mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
refactor(ui): revamp exit stats display (#2771)
This commit is contained in:
@@ -1,45 +1,24 @@
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`<SessionSummaryDisplay /> > correctly sums and displays stats from multiple models 1`] = `
|
||||
"╭─────────────────────────────────────╮
|
||||
│ │
|
||||
│ Agent powering down. Goodbye! │
|
||||
│ │
|
||||
│ │
|
||||
│ Cumulative Stats (15 API calls) │
|
||||
│ │
|
||||
│ Input Tokens 1,500 │
|
||||
│ Output Tokens 3,000 │
|
||||
│ Tool Use Tokens 220 │
|
||||
│ Thoughts Tokens 350 │
|
||||
│ Cached Tokens 600 (12.0%) │
|
||||
│ ───────────────────────────────── │
|
||||
│ Total Tokens 5,000 │
|
||||
│ │
|
||||
│ Total duration (API) 1m 2s │
|
||||
│ Total duration (Tools) 0s │
|
||||
│ Total duration (wall) 1h 23m 45s │
|
||||
│ │
|
||||
╰─────────────────────────────────────╯"
|
||||
`;
|
||||
|
||||
exports[`<SessionSummaryDisplay /> > renders zero state correctly 1`] = `
|
||||
"╭─────────────────────────────────────╮
|
||||
│ │
|
||||
│ Agent powering down. Goodbye! │
|
||||
│ │
|
||||
│ │
|
||||
│ Cumulative Stats (0 API calls) │
|
||||
│ │
|
||||
│ Input Tokens 0 │
|
||||
│ Output Tokens 0 │
|
||||
│ Thoughts Tokens 0 │
|
||||
│ ───────────────────────────────── │
|
||||
│ Total Tokens 0 │
|
||||
│ │
|
||||
│ Total duration (API) 0s │
|
||||
│ Total duration (Tools) 0s │
|
||||
│ Total duration (wall) 1h 23m 45s │
|
||||
│ │
|
||||
╰─────────────────────────────────────╯"
|
||||
exports[`<SessionSummaryDisplay /> > renders the summary display with a title 1`] = `
|
||||
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ │
|
||||
│ Agent powering down. Goodbye! │
|
||||
│ │
|
||||
│ Performance │
|
||||
│ Wall Time: 1h 23m 45s │
|
||||
│ Agent Active: 50.2s │
|
||||
│ » API Time: 50.2s (100.0%) │
|
||||
│ » Tool Time: 0s (0.0%) │
|
||||
│ │
|
||||
│ │
|
||||
│ Model Usage Reqs Input Tokens Output Tokens │
|
||||
│ ─────────────────────────────────────────────────────────────── │
|
||||
│ gemini-2.5-pro 10 1,000 2,000 │
|
||||
│ │
|
||||
│ Savings Highlight: 500 (50.0%) of input tokens were served from the cache, reducing costs. │
|
||||
│ │
|
||||
│ » Tip: For a full token breakdown, run \`/stats model\`. │
|
||||
│ │
|
||||
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
`;
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`<DurationColumn /> > renders a duration column 1`] = `
|
||||
"Duration
|
||||
|
||||
API Time 5s
|
||||
Wall Time 10s"
|
||||
`;
|
||||
|
||||
exports[`<StatRow /> > renders a label and value 1`] = `"Test Label Test Value"`;
|
||||
|
||||
exports[`<StatRow /> > renders with a specific value color 1`] = `"Test Label Test Value"`;
|
||||
|
||||
exports[`<StatsColumn /> > renders a cumulative stats column with percentages 1`] = `
|
||||
"Cumulative Stats
|
||||
|
||||
Input Tokens 100
|
||||
Output Tokens 200
|
||||
Tool Use Tokens 50
|
||||
Thoughts Tokens 25
|
||||
Cached Tokens 10 (2.6%)
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Total Tokens 385"
|
||||
`;
|
||||
|
||||
exports[`<StatsColumn /> > renders a stats column with a specific width 1`] = `
|
||||
"Test Stats
|
||||
|
||||
Input Tokens 100
|
||||
Output Tokens 200
|
||||
Tool Use Tokens 50
|
||||
Thoughts Tokens 25
|
||||
Cached Tokens 10
|
||||
──────────────────────────────────────────────────
|
||||
Total Tokens 385"
|
||||
`;
|
||||
|
||||
exports[`<StatsColumn /> > renders a stats column with children 1`] = `
|
||||
"Test Stats
|
||||
|
||||
Input Tokens 100
|
||||
Output Tokens 200
|
||||
Tool Use Tokens 50
|
||||
Thoughts Tokens 25
|
||||
Cached Tokens 10
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Total Tokens 385
|
||||
Child Prop Child Value"
|
||||
`;
|
||||
@@ -95,6 +95,36 @@ exports[`<StatsDisplay /> > Conditional Rendering Tests > hides User Agreement w
|
||||
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
`;
|
||||
|
||||
exports[`<StatsDisplay /> > Title Rendering > renders the custom title when a title prop is provided 1`] = `
|
||||
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ │
|
||||
│ Agent powering down. Goodbye! │
|
||||
│ │
|
||||
│ Performance │
|
||||
│ Wall Time: 1s │
|
||||
│ Agent Active: 0s │
|
||||
│ » API Time: 0s (0.0%) │
|
||||
│ » Tool Time: 0s (0.0%) │
|
||||
│ │
|
||||
│ │
|
||||
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
`;
|
||||
|
||||
exports[`<StatsDisplay /> > Title Rendering > renders the default title when no title prop is provided 1`] = `
|
||||
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ │
|
||||
│ Session Stats │
|
||||
│ │
|
||||
│ Performance │
|
||||
│ Wall Time: 1s │
|
||||
│ Agent Active: 0s │
|
||||
│ » API Time: 0s (0.0%) │
|
||||
│ » Tool Time: 0s (0.0%) │
|
||||
│ │
|
||||
│ │
|
||||
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
`;
|
||||
|
||||
exports[`<StatsDisplay /> > renders a table with two models correctly 1`] = `
|
||||
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ │
|
||||
|
||||
Reference in New Issue
Block a user