放宽 MCP 重载库存等待窗口

This commit is contained in:
shiyue
2026-09-15 14:14:11 +08:00
parent c38c937c05
commit 8ecc778645
2 changed files with 3 additions and 2 deletions

View File

@@ -5173,12 +5173,13 @@ async function handleReloadMcpApi(req, res, rawSessionId) {
let inventoryResult = null;
if (mcpStatus?.status === 'ready') {
const targetSession = loadSession(sessionId);
const reloadInventoryTimeoutMs = CODEX_APP_MCP_STARTUP_TIMEOUT_SEC * 1000;
inventoryResult = await waitForCodexAppMcpInventory(targetSession, {
threadId: currentThreadId,
requireCcweb: true,
requireServers: expectedCodexAppMcpServers(targetSession),
timeoutMs: 5000,
maxWaitMs: 5000,
timeoutMs: reloadInventoryTimeoutMs,
maxWaitMs: reloadInventoryTimeoutMs,
});
updateCodexAppSessionMcpInventory(sessionId, inventoryResult);
mcpStatus = buildCodexAppMcpStatusSummary(loadSession(sessionId), { reloadRequestedAt });