mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 06:30:21 +00:00
chore: enable redundant type constituent checks
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user