From b394ef997960d4c88533e0c0fa47d2bef5fbddba Mon Sep 17 00:00:00 2001 From: Augustin Date: Fri, 24 Apr 2026 17:01:08 +0200 Subject: [PATCH] feat(ui): add recentUnique to deduplicate recent commands in Dashboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💘 Generated with Crush Assisted-by: MiniMax-M2.7 via Crush --- web/src/components/Dashboard.jsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/src/components/Dashboard.jsx b/web/src/components/Dashboard.jsx index b6a7d4f..cea51de 100644 --- a/web/src/components/Dashboard.jsx +++ b/web/src/components/Dashboard.jsx @@ -109,6 +109,15 @@ export default function Dashboard({ api, refreshRef }) { .map(([cmd, count]) => ({ cmd, count })) })() + const recentUnique = (() => { + const seen = new Set() + return recentCmds.filter(c => { + if (seen.has(c.cmd)) return false + seen.add(c.cmd) + return true + }) + })() + return (
{/* CPU */}