Commit e0fa7ae
committed
feat: group identical consecutive console messages in list_console_messages
Group consecutive messages with the same type and text, displaying a
count suffix (e.g. [20 times]) similar to Chrome DevTools' console
grouping behavior. Grouping is applied before pagination so the
grouped count accurately reflects the total items.
- Add groupConsecutive() static method to ConsoleFormatter
- Add toStringGrouped()/toJSONGrouped() for count-aware formatting
- Add optional count field to ConsoleMessageConcise interface
- Apply grouping in McpResponse before pagination
Fixes #9041 parent b53752d commit e0fa7ae
2 files changed
Lines changed: 62 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1031 | 1031 | | |
1032 | 1032 | | |
1033 | 1033 | | |
| 1034 | + | |
1034 | 1035 | | |
1035 | | - | |
| 1036 | + | |
1036 | 1037 | | |
1037 | 1038 | | |
1038 | 1039 | | |
1039 | 1040 | | |
1040 | 1041 | | |
1041 | | - | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
1042 | 1047 | | |
1043 | | - | |
1044 | | - | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1045 | 1053 | | |
1046 | 1054 | | |
1047 | 1055 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
175 | 178 | | |
176 | 179 | | |
177 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
178 | 190 | | |
179 | 191 | | |
180 | 192 | | |
| |||
201 | 213 | | |
202 | 214 | | |
203 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
204 | 252 | | |
205 | 253 | | |
206 | 254 | | |
| |||
216 | 264 | | |
217 | 265 | | |
218 | 266 | | |
219 | | - | |
| 267 | + | |
| 268 | + | |
220 | 269 | | |
221 | 270 | | |
222 | 271 | | |
| |||
0 commit comments