mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:50:45 +00:00
test(agents): trim subagent spawn config duplication
This commit is contained in:
@@ -7,24 +7,7 @@ import {
|
|||||||
|
|
||||||
const hoisted = vi.hoisted(() => ({
|
const hoisted = vi.hoisted(() => ({
|
||||||
callGatewayMock: vi.fn(),
|
callGatewayMock: vi.fn(),
|
||||||
configOverride: {
|
configOverride: {} as Record<string, unknown>,
|
||||||
session: { mainKey: "main", scope: "per-sender" },
|
|
||||||
tools: {
|
|
||||||
sessions_spawn: {
|
|
||||||
attachments: {
|
|
||||||
enabled: true,
|
|
||||||
maxFiles: 50,
|
|
||||||
maxFileBytes: 1 * 1024 * 1024,
|
|
||||||
maxTotalBytes: 5 * 1024 * 1024,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
agents: {
|
|
||||||
defaults: {
|
|
||||||
workspace: "/tmp",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let resetSubagentRegistryForTests: typeof import("./subagent-registry.js").resetSubagentRegistryForTests;
|
let resetSubagentRegistryForTests: typeof import("./subagent-registry.js").resetSubagentRegistryForTests;
|
||||||
|
|||||||
@@ -8,24 +8,7 @@ type GatewayRequest = { method?: string; params?: Record<string, unknown> };
|
|||||||
|
|
||||||
const hoisted = vi.hoisted(() => ({
|
const hoisted = vi.hoisted(() => ({
|
||||||
callGatewayMock: vi.fn(),
|
callGatewayMock: vi.fn(),
|
||||||
configOverride: {
|
configOverride: {} as Record<string, unknown>,
|
||||||
session: { mainKey: "main", scope: "per-sender" },
|
|
||||||
tools: {
|
|
||||||
sessions_spawn: {
|
|
||||||
attachments: {
|
|
||||||
enabled: true,
|
|
||||||
maxFiles: 50,
|
|
||||||
maxFileBytes: 1 * 1024 * 1024,
|
|
||||||
maxTotalBytes: 5 * 1024 * 1024,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
agents: {
|
|
||||||
defaults: {
|
|
||||||
workspace: "/tmp",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const hookRunnerMocks = vi.hoisted(() => ({
|
const hookRunnerMocks = vi.hoisted(() => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user