Commit 8c1425fef1ed027137f59fd82aecf3581aa2071c
1 parent
ab16b18f
style: 将发送 Prompt 空闲超时时间从 120s 缩减到 45s
Showing
1 changed file
with
2 additions
and
2 deletions
packages/acp-core/protocol/ClaudeCliProtocol.js
| @@ -200,8 +200,8 @@ class ClaudeCliProtocol extends EventEmitter { | @@ -200,8 +200,8 @@ class ClaudeCliProtocol extends EventEmitter { | ||
| 200 | this._promptResolve = resolve; | 200 | this._promptResolve = resolve; |
| 201 | this._promptReject = reject; | 201 | this._promptReject = reject; |
| 202 | 202 | ||
| 203 | - // 超时保护:如果 120 秒内没有任何 stdout 活动(API hang/rate limit 静默),自动 reject | ||
| 204 | - const IDLE_TIMEOUT_MS = 120_000; | 203 | + // 超时保护:如果 45 秒内没有任何 stdout 活动(API hang/rate limit 静默),自动 reject |
| 204 | + const IDLE_TIMEOUT_MS = 45_000; | ||
| 205 | let idleTimer = setTimeout(() => { | 205 | let idleTimer = setTimeout(() => { |
| 206 | if (this._promptReject) { | 206 | if (this._promptReject) { |
| 207 | const err = new Error(`Claude CLI 响应超时 (${IDLE_TIMEOUT_MS / 1000}s 无活动)`); | 207 | const err = new Error(`Claude CLI 响应超时 (${IDLE_TIMEOUT_MS / 1000}s 无活动)`); |