style: format repository

This commit is contained in:
Peter Steinberger
2026-04-26 05:47:05 +01:00
parent 6a67f65568
commit 27aedcfd56
397 changed files with 4106 additions and 4517 deletions

View File

@@ -338,7 +338,11 @@ export class MemoryIndexManager extends MemoryManagerEmbeddingOps implements Mem
opts?.sources && opts.sources.length > 0
? [...new Set(opts.sources)].filter((s) => this.sources.has(s))
: undefined;
if (opts?.sources && opts.sources.length > 0 && (!searchSources || searchSources.length === 0)) {
if (
opts?.sources &&
opts.sources.length > 0 &&
(!searchSources || searchSources.length === 0)
) {
return [];
}
const sourceFilterList = searchSources ?? [...this.sources];
@@ -375,9 +379,12 @@ export class MemoryIndexManager extends MemoryManagerEmbeddingOps implements Mem
});
const searchTerms = keywords.length > 0 ? keywords : [cleaned];
return searchTerms.map((term) =>
this.searchKeyword(term, candidates, { boostFallbackRanking: true }, sourceFilterList).catch(
() => [],
),
this.searchKeyword(
term,
candidates,
{ boostFallbackRanking: true },
sourceFilterList,
).catch(() => []),
);
})(),
);

View File

@@ -1,4 +1,5 @@
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
import type { MemorySource } from "openclaw/plugin-sdk/memory-core-host-engine-storage";
import {
asToolParamsRecord,
jsonResult,
@@ -6,7 +7,6 @@ import {
readStringParam,
type OpenClawConfig,
} from "openclaw/plugin-sdk/memory-core-host-runtime-core";
import type { MemorySource } from "openclaw/plugin-sdk/memory-core-host-engine-storage";
import type {
MemorySearchResult,
MemorySearchRuntimeDebug,