summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/__snapshots__
diff options
context:
space:
mode:
authorAbhi <[email protected]>2025-06-30 20:28:49 -0400
committerGitHub <[email protected]>2025-07-01 00:28:49 +0000
commitf91927569c6980a3884674f5f1ab581fcb00f2ce (patch)
tree5f551cb4d2c5411142c7c3db43d6a5f7e4458825 /packages/cli/src/ui/components/__snapshots__
parent3587054d32372874a4e067ae050f861ad1cec2b4 (diff)
refactor(ui): revamp exit stats display (#2771)
Diffstat (limited to 'packages/cli/src/ui/components/__snapshots__')
-rw-r--r--packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap63
-rw-r--r--packages/cli/src/ui/components/__snapshots__/Stats.test.tsx.snap49
-rw-r--r--packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap30
3 files changed, 51 insertions, 91 deletions
diff --git a/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap
index 06dc2116..c9b2bd64 100644
--- a/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap
+++ b/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap
@@ -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\`. │
+│ │
+╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;
diff --git a/packages/cli/src/ui/components/__snapshots__/Stats.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/Stats.test.tsx.snap
deleted file mode 100644
index 9b003891..00000000
--- a/packages/cli/src/ui/components/__snapshots__/Stats.test.tsx.snap
+++ /dev/null
@@ -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"
-`;
diff --git a/packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap
index 6fc2565e..c7c2ec59 100644
--- a/packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap
+++ b/packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap
@@ -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`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │