降低终端输入延迟:将WebSocket等待超时从1200ms降至200ms

This commit is contained in:
2026-03-20 00:05:44 +08:00
parent cd18e76b2d
commit fd7438afae
2 changed files with 3812 additions and 1 deletions

3811
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -50,7 +50,7 @@ type TerminalInputControlMessage = {
const CONTROL_TAG_JSON = 0x01;
const WS_READY_STATE_OPEN = 1;
const DEFAULT_TERMINAL_INPUT_WS_PATH = '/api/terminal/input-ws';
const WS_SEND_WAIT_MS = 1200;
const WS_SEND_WAIT_MS = 200;
const WS_RECONNECT_INITIAL_DELAY_MS = 1000;
const WS_RECONNECT_MAX_DELAY_MS = 30000;
const WS_RECONNECT_JITTER_MS = 250;