Skip to content

Commit 1529fd4

Browse files
ArcherGuOrKoN
authored andcommitted
fix: console messages filter missing
1 parent cb5ca5a commit 1529fd4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/McpResponse.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,15 @@ Call ${handleDialog.name} to handle it before continuing.`);
319319
}
320320

321321
if (this.#consoleDataOptions?.include) {
322-
const messages = this.#consoleMessagesData ?? [];
322+
let messages = this.#consoleMessagesData ?? [];
323+
324+
// Apply type filtering if specified
325+
if (this.#consoleDataOptions.types?.length) {
326+
const normalizedTypes = new Set(
327+
this.#consoleDataOptions.types,
328+
);
329+
messages = messages.filter(message => normalizedTypes.has(message.type));
330+
}
323331

324332
response.push('## Console messages');
325333
if (messages.length) {

0 commit comments

Comments
 (0)