diff --git a/src/commands/agent.runtime-config.test.ts b/src/commands/agent.runtime-config.test.ts index 7bee7031e9b..88df3f8dd29 100644 --- a/src/commands/agent.runtime-config.test.ts +++ b/src/commands/agent.runtime-config.test.ts @@ -27,6 +27,14 @@ vi.mock("../config/io.js", () => ({ readConfigFileSnapshotForWrite: readConfigFileSnapshotForWriteMock, })); +vi.mock("../cli/command-secret-targets.js", () => ({ + getAgentRuntimeCommandSecretTargetIds: (params?: { includeChannelTargets?: boolean }) => + new Set([ + "models.providers.*.apiKey", + ...(params?.includeChannelTargets === true ? ["channels.telegram.botToken"] : []), + ]), +})); + const setRuntimeConfigSnapshotMock = vi.hoisted(() => vi.fn<(cfg: OpenClawConfig, sourceConfig: OpenClawConfig) => void>(), );