From 770f862832dfef477705bee69bd2a84397d105a8 Mon Sep 17 00:00:00 2001
From: Abhi <43648792+abhipatel12@users.noreply.github.com>
Date: Sun, 29 Jun 2025 20:44:33 -0400
Subject: feat: Change /stats to include more detailed breakdowns (#2615)
---
.../__snapshots__/ToolStatsDisplay.test.tsx.snap | 91 ++++++++++++++++++++++
1 file changed, 91 insertions(+)
create mode 100644 packages/cli/src/ui/components/__snapshots__/ToolStatsDisplay.test.tsx.snap
(limited to 'packages/cli/src/ui/components/__snapshots__/ToolStatsDisplay.test.tsx.snap')
diff --git a/packages/cli/src/ui/components/__snapshots__/ToolStatsDisplay.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/ToolStatsDisplay.test.tsx.snap
new file mode 100644
index 00000000..61fb3efc
--- /dev/null
+++ b/packages/cli/src/ui/components/__snapshots__/ToolStatsDisplay.test.tsx.snap
@@ -0,0 +1,91 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[` > should display stats for a single tool correctly 1`] = `
+"╭────────────────────────────────────────────────────────────────────╮
+│ │
+│ Tool Stats For Nerds │
+│ │
+│ Tool Name Calls Success Rate Avg Duration │
+│ ──────────────────────────────────────────────────────────────── │
+│ test-tool 1 100.0% 100ms │
+│ │
+│ User Decision Summary │
+│ Total Reviewed Suggestions: 1 │
+│ » Accepted: 1 │
+│ » Rejected: 0 │
+│ » Modified: 0 │
+│ ──────────────────────────────────────────────────────────────── │
+│ Overall Agreement Rate: 100.0% │
+│ │
+╰────────────────────────────────────────────────────────────────────╯"
+`;
+
+exports[` > should display stats for multiple tools correctly 1`] = `
+"╭────────────────────────────────────────────────────────────────────╮
+│ │
+│ Tool Stats For Nerds │
+│ │
+│ Tool Name Calls Success Rate Avg Duration │
+│ ──────────────────────────────────────────────────────────────── │
+│ tool-a 2 50.0% 100ms │
+│ tool-b 1 100.0% 100ms │
+│ │
+│ User Decision Summary │
+│ Total Reviewed Suggestions: 3 │
+│ » Accepted: 1 │
+│ » Rejected: 1 │
+│ » Modified: 1 │
+│ ──────────────────────────────────────────────────────────────── │
+│ Overall Agreement Rate: 33.3% │
+│ │
+╰────────────────────────────────────────────────────────────────────╯"
+`;
+
+exports[` > should handle large values without wrapping or overlapping 1`] = `
+"╭────────────────────────────────────────────────────────────────────╮
+│ │
+│ Tool Stats For Nerds │
+│ │
+│ Tool Name Calls Success Rate Avg Duration │
+│ ──────────────────────────────────────────────────────────────── │
+│ long-named-tool-for-testi99999999 88.9% 1ms │
+│ ng-wrapping-and-such 9 │
+│ │
+│ User Decision Summary │
+│ Total Reviewed Suggestions: 222234566 │
+│ » Accepted: 123456789 │
+│ » Rejected: 98765432 │
+│ » Modified: 12345 │
+│ ──────────────────────────────────────────────────────────────── │
+│ Overall Agreement Rate: 55.6% │
+│ │
+╰────────────────────────────────────────────────────────────────────╯"
+`;
+
+exports[` > should handle zero decisions gracefully 1`] = `
+"╭────────────────────────────────────────────────────────────────────╮
+│ │
+│ Tool Stats For Nerds │
+│ │
+│ Tool Name Calls Success Rate Avg Duration │
+│ ──────────────────────────────────────────────────────────────── │
+│ test-tool 1 100.0% 100ms │
+│ │
+│ User Decision Summary │
+│ Total Reviewed Suggestions: 0 │
+│ » Accepted: 0 │
+│ » Rejected: 0 │
+│ » Modified: 0 │
+│ ──────────────────────────────────────────────────────────────── │
+│ Overall Agreement Rate: -- │
+│ │
+╰────────────────────────────────────────────────────────────────────╯"
+`;
+
+exports[` > should render "no tool calls" message when there are no active tools 1`] = `
+"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
+│ │
+│ No tool calls have been made in this session. │
+│ │
+╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
+`;
--
cgit v1.2.3