feat: v0.10.2 - 可配置超时设置 + 默认值提升

- HTTP超时: 15s→30s(可配5s~300s), MCP超时: 30s→60s(可配10s~300s), 流式超时: 180s→300s(可配0~600s)
- 设置面板新增超时配置区域(HTTP/流式/MCP),留空使用默认值
- 主进程HTTP_TIMEOUT/MCP_TIMEOUT改为可配置变量,通过IPC setTimeouts通道接收
- 帮助面板/README/release-notes更新四引擎搜索和超时描述
- 版本号同步更新至v0.10.2(16处)
This commit is contained in:
thzxx
2026-06-10 09:39:59 +08:00
parent 64264cc0f8
commit 6390457312
17 changed files with 157 additions and 27 deletions
+7 -1
View File
@@ -52,7 +52,13 @@ interface MCPServerInstance {
// ─── 状态 ───
const servers = new Map<string, MCPServerInstance>();
const MCP_TIMEOUT = 30000; // 30 秒超时
/** MCP 请求超时(毫秒),默认 60s,可通过 IPC 设置 */
let MCP_TIMEOUT = 60_000;
/** 设置 MCP 请求超时(毫秒) */
export function setMCPTimeout(ms: number): void {
MCP_TIMEOUT = Math.max(10_000, Math.min(300_000, ms)); // 10s ~ 300s
}
// ─── JSON-RPC 通信 ───