feat: group identical consecutive console messages in list_console_messages#1939
Merged
OrKoN merged 1 commit intoChromeDevTools:mainfrom Apr 23, 2026
Conversation
46d187b to
65c63d8
Compare
OrKoN
reviewed
Apr 22, 2026
65c63d8 to
6e3d0de
Compare
Contributor
Author
|
@OrKoN
Ready for another look when you get a chance. Thanks! |
Collaborator
|
Please update the PR description accordingly. |
Contributor
Author
|
@OrKoN |
…ssages Group consecutive console messages with the same type, text, and argument count into a single entry with a count indicator (e.g. [5 times]). Introduces GroupedConsoleFormatter subclass that extends ConsoleFormatter to handle grouped message display.
6e3d0de to
4c95f28
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Group consecutive identical console messages in
list_console_messages, similar to Chrome DevTools' console grouping behavior.Fixes #904
Changes
GroupedConsoleFormattersubclass that extendsConsoleFormatterand overridestoString()/toJSON()for count-aware formattingConsoleFormatter.groupConsecutive()static method that groups consecutive messages with the same type, text, and argument countKey design decisions
GroupedConsoleFormattersubclass: Keeps the existing formatter interface clean — no new methods added toConsoleFormatter.ConsoleFormatterandGroupedConsoleFormatterare interchangeable via the same interface.McpResponsebefore callingpaginate().lastId: Since grouped messages are truly identical, only the first message's ID is needed.argCountmatching: Prevents false grouping of messages with the same text but different argument counts.Output example
Testing
tests/formatters/ConsoleFormatterGrouping.test.ts