chore: enable redundant type constituent checks

This commit is contained in:
Peter Steinberger
2026-04-10 21:23:29 +01:00
parent 6783bef7ed
commit d236cb4680
25 changed files with 79 additions and 71 deletions

View File

@@ -20,7 +20,7 @@ function resolveStoredDreaming(config: OpenClawConfig): Record<string, unknown>
}
function createHarness(initialConfig: OpenClawConfig = {}) {
let command: OpenClawPluginCommandDefinition | undefined;
const registered: { command?: OpenClawPluginCommandDefinition } = {};
let runtimeConfig: OpenClawConfig = initialConfig;
const runtime = {
@@ -35,18 +35,18 @@ function createHarness(initialConfig: OpenClawConfig = {}) {
const api = {
runtime,
registerCommand: vi.fn((definition: OpenClawPluginCommandDefinition) => {
command = definition;
registered.command = definition;
}),
} as unknown as OpenClawPluginApi;
registerDreamingCommand(api);
if (!command) {
if (!registered.command) {
throw new Error("memory-core did not register /dreaming");
}
return {
command,
command: registered.command,
runtime,
getRuntimeConfig: () => runtimeConfig,
};

View File

@@ -145,7 +145,7 @@ describe("QmdMemoryManager", () => {
let cfg: OpenClawConfig;
const agentId = "main";
const openManagers = new Set<QmdMemoryManager>();
let embedStartupJitterSpy: ReturnType<typeof vi.spyOn> | null = null;
let embedStartupJitterSpy: { mockRestore: () => void } | null = null;
function seedMemoryEmbeddingProviders(): void {
(globalThis as Record<PropertyKey, unknown>)[MEMORY_EMBEDDING_PROVIDERS_KEY] = new Map([