feat: show message counter in history page#9524
Conversation
Learn moreAll Green is an AI agent that automatically: ✅ Addresses code review comments ✅ Fixes failing CI checks ✅ Resolves merge conflicts |
1 similar comment
Learn moreAll Green is an AI agent that automatically: ✅ Addresses code review comments ✅ Fixes failing CI checks ✅ Resolves merge conflicts |
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="gui/src/components/History/HistoryTableRow.tsx">
<violation number="1" location="gui/src/components/History/HistoryTableRow.tsx:155">
P2: Message counter is placed at the right edge (`ml-auto`) but the hover action bar is absolutely positioned at the same right edge and stacks above it, causing the counter/tooltip to be obscured when hovering the row.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
RomneyDa
left a comment
There was a problem hiding this comment.
@uinstinct this is a nice addition! See comment about counting. I think cubic's feedback is also valid, the positioning isn't too bad but maybe we could try some other places to put the number, and maybe add a little message icon or something
core/util/history.ts
Outdated
|
|
||
| let found = false; | ||
| const messageCount = session.history.filter( | ||
| (item) => item.message.role === "user", |
There was a problem hiding this comment.
(item) => item.message.role === "user",
I think for longer agent conversations this will show a number much lower than it should e.g. 1 user message, 20 assistant/tool messages will show 1
Maybe we could count conversational turns or just simple chatHistory.length excluding system message?
There was a problem hiding this comment.
actually when trying out chatHistory.length, it show around 15 counter for a single message conversation which would include tool calls and assistant messages. I think the user will want to know how many followups he did.
@RomneyDa what do you think about replacing the message counter with dots or bars? something like | | | indicating 3 messages or • • • or ● ● ●. when there are more than 7-8 messages (depending on the sidebar width), it will show the counter.
There was a problem hiding this comment.
I think it's currently counting by filtering for user messages, am I reading that wrong?
Personally I prefer a little number with message icon or similar to dots or bars but I don't have super strong opinions about the design!
There was a problem hiding this comment.
yes only user messages.
How about putting dots for the initial design? If they do not look good, it can be changed
There was a problem hiding this comment.
yes only user messages
I think it needs to count all messages or conversation turns
I'd lean small number over dots but I won't block design would just pass to @TyDunn 👍
There was a problem hiding this comment.
Okay.
Just want to make sure I am understanding correctly:
- Does "all messages" mean total number of messages in the chat history? (If so, I think this would indicate tool call messages being counted as well which could confuse the user)
- What do "conversation turns" indicate? How to count that?
There was a problem hiding this comment.
I think conversation turns makes the most sense i.e. request response request response
request = user or tool (parallel tool calls = 1)
response = assistant (assistant + thinking = 1)
There was a problem hiding this comment.
Okay. I have changed it count the "assistant" message only which will effectively count the conversation turns.
|
@uinstinct code looks good to me, I pulled and looks like the hover thing still covers the number, could you tweak to move it around a bit?
|
Sure. Changed the position.
|
|
🎉 This PR is included in version 1.41.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |





Description
Show the number of messages (sent by the user) as a counter in the extension's history page.
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
feat.mp4
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Continue Tasks:▶️ 2 queued · ▶️ 1 not started — View all
Summary by cubic
Add a message counter to the history page that shows how many assistant messages each session contains. This makes it easier to scan session size at a glance.
Written for commit e1b30ba. Summary will update on new commits.