refactor(agents): hide idle timeout default · openclaw/openclaw@bfc5e49
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
File tree
src/agents/embedded-agent-runner/run
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,14 +7,16 @@ import {
|
7 | 7 | } from "openclaw/plugin-sdk/llm"; |
8 | 8 | import { afterEach, describe, expect, it, vi } from "vitest"; |
9 | 9 | import type { OpenClawConfig } from "../../../config/config.js"; |
| 10 | +import { DEFAULT_LLM_IDLE_TIMEOUT_SECONDS } from "../../../config/agent-timeout-defaults.js"; |
10 | 11 | import { notifyLlmRequestActivity } from "../../../shared/llm-request-activity.js"; |
11 | 12 | import type { StreamFn } from "../../runtime/index.js"; |
12 | 13 | import { |
13 | | -DEFAULT_LLM_IDLE_TIMEOUT_MS, |
14 | 14 | resolveLlmIdleTimeoutMs, |
15 | 15 | streamWithIdleTimeout, |
16 | 16 | } from "./llm-idle-timeout.js"; |
17 | 17 | |
| 18 | +const DEFAULT_LLM_IDLE_TIMEOUT_MS = DEFAULT_LLM_IDLE_TIMEOUT_SECONDS * 1000; |
| 19 | + |
18 | 20 | describe("resolveLlmIdleTimeoutMs", () => { |
19 | 21 | it("returns default when config is undefined", () => { |
20 | 22 | expect(resolveLlmIdleTimeoutMs()).toBe(DEFAULT_LLM_IDLE_TIMEOUT_MS); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -17,7 +17,7 @@ import type { EmbeddedRunTrigger } from "./params.js";
|
17 | 17 | /** |
18 | 18 | * Default idle timeout for LLM streaming responses in milliseconds. |
19 | 19 | */ |
20 | | -export const DEFAULT_LLM_IDLE_TIMEOUT_MS = DEFAULT_LLM_IDLE_TIMEOUT_SECONDS * 1000; |
| 20 | +const DEFAULT_LLM_IDLE_TIMEOUT_MS = DEFAULT_LLM_IDLE_TIMEOUT_SECONDS * 1000; |
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Detects loopback / private-network / `.local` base URLs. Local providers |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。