Skip to content

Commit c452f15

Browse files
committed
fix(lsp): filter noisy progress/workDoneProgress logs from info dialog
1 parent ada513a commit c452f15

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/components/lspInfoDialog/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,23 @@ let dialogInstance = null;
1111
const lspLogs = new Map();
1212
const MAX_LOGS = 200;
1313
const logListeners = new Set();
14+
const IGNORED_LOG_PATTERNS = [
15+
/\$\/progress\b/i,
16+
/\bProgress:/i,
17+
/\bwindow\/workDoneProgress\/create\b/i,
18+
/\bAuto-responded to window\/workDoneProgress\/create\b/i,
19+
];
20+
21+
function shouldIgnoreLog(message) {
22+
if (typeof message !== "string") return false;
23+
return IGNORED_LOG_PATTERNS.some((pattern) => pattern.test(message));
24+
}
1425

1526
function addLspLog(serverId, level, message, details = null) {
27+
if (shouldIgnoreLog(message)) {
28+
return;
29+
}
30+
1631
if (!lspLogs.has(serverId)) {
1732
lspLogs.set(serverId, []);
1833
}

0 commit comments

Comments
 (0)