refactor: centralize agent timeout defaults

This commit is contained in:
Peter Steinberger
2026-01-06 02:48:44 +00:00
parent d83ca74c18
commit 20a361a3cf
9 changed files with 90 additions and 27 deletions

View File

@@ -84,6 +84,7 @@ export const cronIsolatedRun = hoisted.cronIsolatedRun;
export const agentCommand = hoisted.agentCommand;
export const testState = {
agentConfig: undefined as Record<string, unknown> | undefined,
sessionStorePath: undefined as string | undefined,
sessionConfig: undefined as Record<string, unknown> | undefined,
allowFrom: undefined as string[] | undefined,
@@ -243,6 +244,7 @@ vi.mock("../config/config.js", async () => {
agent: {
model: "anthropic/claude-opus-4-5",
workspace: path.join(os.tmpdir(), "clawd-gateway-test"),
...testState.agentConfig,
},
whatsapp: {
allowFrom: testState.allowFrom,
@@ -351,6 +353,7 @@ export function installGatewayTestHooks() {
testState.cronStorePath = undefined;
testState.sessionConfig = undefined;
testState.sessionStorePath = undefined;
testState.agentConfig = undefined;
testState.allowFrom = undefined;
testIsNixMode.value = false;
cronIsolatedRun.mockClear();