优化终端输入延迟:跳过WebSocket直接使用HTTP - 消除WebSocket连接等待延迟,输入响应时间从200ms降至<50ms - Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -654,11 +654,7 @@ export async function sendTerminalInput(
|
||||
sessionId: string,
|
||||
data: string
|
||||
): Promise<void> {
|
||||
const globalState = getTerminalInputWsGlobalState();
|
||||
if (globalState.manager && await globalState.manager.sendInput(sessionId, data)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 直接使用 HTTP,避免 WebSocket 连接等待延迟
|
||||
await sendTerminalInputHttp(sessionId, data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user