mirror of
https://github.com/yusufipk/YTChatHub.git
synced 2026-09-11 10:56:17 +00:00
fix(backend): remove verbose message trimming logs
Removes the console.log spam that was triggered on every incoming chat message when the store exceeded MAX_REGULAR_MESSAGES. The trimming logic still works silently in the background.
This commit is contained in:
@@ -27,6 +27,7 @@ node_modules/
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
.codellm
|
||||||
# OS specific
|
# OS specific
|
||||||
|
|
||||||
# Task files and project management
|
# Task files and project management
|
||||||
|
|||||||
@@ -441,10 +441,6 @@ function trimMessages(store: ChatMessage[]): void {
|
|||||||
// Replace store contents
|
// Replace store contents
|
||||||
store.length = 0;
|
store.length = 0;
|
||||||
store.push(...newStore);
|
store.push(...newStore);
|
||||||
|
|
||||||
const newRegularCount = regularCount - toRemove;
|
|
||||||
const specialCount = specialIndices.length;
|
|
||||||
console.log(`[Backend] Trimmed ${toRemove} regular messages. Now: ${newRegularCount} regular + ${specialCount} special = ${store.length} total`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user