style(gemini): apply linter fixes for code quality check

This commit is contained in:
Anonymous Contributor
2026-02-14 15:54:27 +08:00
parent 3f0dabc5fa
commit 3f81afabce

View File

@@ -653,7 +653,8 @@ async function handleMessages(req, res) {
streamBuffer += chunkStr
// 如果 buffer 过大,进行保护性清理(防止内存泄漏)
if (streamBuffer.length > 1024 * 1024) { // 1MB
if (streamBuffer.length > 1024 * 1024) {
// 1MB
streamBuffer = streamBuffer.slice(-1024 * 64) // 只保留最后 64KB
}
@@ -1994,7 +1995,8 @@ async function handleStreamGenerateContent(req, res) {
streamBuffer += chunkStr
// 如果 buffer 过大,进行保护性清理(防止内存泄漏)
if (streamBuffer.length > 1024 * 1024) { // 1MB
if (streamBuffer.length > 1024 * 1024) {
// 1MB
streamBuffer = streamBuffer.slice(-1024 * 64) // 只保留最后 64KB
}