From 3952a605e54de22a55d4611736cf7cdac64735cf Mon Sep 17 00:00:00 2001
From: uinstinct <61635505+uinstinct@users.noreply.github.com>
Date: Wed, 14 Jan 2026 19:33:45 +0530
Subject: [PATCH 1/3] feat: show message counter in the extension's history
page
---
core/index.d.ts | 1 +
core/util/history.ts | 5 +++++
gui/src/components/History/HistoryTableRow.tsx | 15 ++++++++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/core/index.d.ts b/core/index.d.ts
index 197b5516d0c..688036d325f 100644
--- a/core/index.d.ts
+++ b/core/index.d.ts
@@ -290,6 +290,7 @@ export interface BaseSessionMetadata {
title: string;
dateCreated: string;
workspaceDirectory: string;
+ messageCount?: number;
}
export interface RangeInFile {
diff --git a/core/util/history.ts b/core/util/history.ts
index cc1cf69cbf6..25789f53b8d 100644
--- a/core/util/history.ts
+++ b/core/util/history.ts
@@ -141,10 +141,14 @@ export class HistoryManager {
}
let found = false;
+ const messageCount = session.history.filter(
+ (item) => item.message.role === "user",
+ ).length;
for (const sessionMetadata of sessionsList) {
if (sessionMetadata.sessionId === session.sessionId) {
sessionMetadata.title = session.title;
sessionMetadata.workspaceDirectory = session.workspaceDirectory;
+ sessionMetadata.messageCount = messageCount;
found = true;
break;
}
@@ -156,6 +160,7 @@ export class HistoryManager {
title: session.title,
dateCreated: String(Date.now()),
workspaceDirectory: session.workspaceDirectory,
+ messageCount,
};
sessionsList.push(sessionMetadata);
}
diff --git a/gui/src/components/History/HistoryTableRow.tsx b/gui/src/components/History/HistoryTableRow.tsx
index 4c6fa2417f2..48a351c49fd 100644
--- a/gui/src/components/History/HistoryTableRow.tsx
+++ b/gui/src/components/History/HistoryTableRow.tsx
@@ -1,8 +1,8 @@
import {
ArrowDownOnSquareIcon,
+ CloudIcon,
PencilSquareIcon,
TrashIcon,
- CloudIcon,
} from "@heroicons/react/24/outline";
import { BaseSessionMetadata } from "core";
import type { RemoteSessionMetadata } from "core/control-plane/client";
@@ -22,6 +22,7 @@ import {
} from "../../redux/thunks/session";
import { isShareSessionSupported } from "../../util";
import HeaderButtonWithToolTip from "../gui/HeaderButtonWithToolTip";
+import { ToolTip } from "../gui/Tooltip";
const shareSessionSupported = isShareSessionSupported();
@@ -144,6 +145,18 @@ export function HistoryTableRow({
Remote
)}
+
+ {sessionMetadata.messageCount !== undefined && (
+