feat: cap log fetch size and add limit query param

This commit is contained in:
hkfires
2025-11-24 20:53:37 +08:00
parent e3a2a34b70
commit d8c06c7f6c
3 changed files with 21 additions and 1 deletions

2
app.js
View File

@@ -20,6 +20,7 @@ import { debounce } from './src/utils/dom.js';
import {
CACHE_EXPIRY_MS,
MAX_LOG_LINES,
LOG_FETCH_LIMIT,
DEFAULT_AUTH_FILES_PAGE_SIZE,
MIN_AUTH_FILES_PAGE_SIZE,
MAX_AUTH_FILES_PAGE_SIZE,
@@ -78,6 +79,7 @@ class CLIProxyManager {
// 当前展示的日志行
this.displayedLogLines = [];
this.maxDisplayLogLines = MAX_LOG_LINES;
this.logFetchLimit = LOG_FETCH_LIMIT;
// 日志时间戳(用于增量加载)
this.latestLogTimestamp = null;