mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-04-19 14:38:39 +00:00
style(gemini): apply linter fixes for code quality check
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user