mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:30:43 +00:00
style: format repository
This commit is contained in:
@@ -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(() => []),
|
||||
);
|
||||
})(),
|
||||
);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user