perf: checkbox dom (#3149)

* perf: checkbox dom

* perf: null check

* perf: simple mode variables

* perf: get csv encoding code

* fix: dataset filter

* perf: code editor ui
This commit is contained in:
Archer
2024-11-13 18:29:24 +08:00
committed by GitHub
parent 98d4a6ee75
commit 0472dc2967
13 changed files with 68 additions and 79 deletions

View File

@@ -118,7 +118,10 @@ export async function searchDatasetData(props: SearchDatasetDataProps) {
let createTimeCollectionIdList: string[] | undefined = undefined;
try {
const jsonMatch = json5.parse(collectionFilterMatch);
const jsonMatch =
typeof collectionFilterMatch === 'object'
? collectionFilterMatch
: json5.parse(collectionFilterMatch);
// Tag
let andTags = jsonMatch?.tags?.$and as (string | null)[] | undefined;
@@ -347,7 +350,7 @@ export async function searchDatasetData(props: SearchDatasetDataProps) {
teamId: new Types.ObjectId(teamId),
datasetId: new Types.ObjectId(id),
$text: { $search: jiebaSplit({ text: query }) },
...(filterCollectionIdList && filterCollectionIdList.length > 0
...(filterCollectionIdList
? {
collectionId: {
$in: filterCollectionIdList.map((id) => new Types.ObjectId(id))

View File

@@ -76,8 +76,6 @@ export async function dispatchDatasetSearch(
nodeDispatchUsages: [],
[DispatchNodeResponseKeyEnum.toolResponses]: []
};
return Promise.reject(i18nT('common:core.chat.error.User input empty'));
}
// query extension