mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00
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:
@@ -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))
|
||||
|
@@ -76,8 +76,6 @@ export async function dispatchDatasetSearch(
|
||||
nodeDispatchUsages: [],
|
||||
[DispatchNodeResponseKeyEnum.toolResponses]: []
|
||||
};
|
||||
|
||||
return Promise.reject(i18nT('common:core.chat.error.User input empty'));
|
||||
}
|
||||
|
||||
// query extension
|
||||
|
Reference in New Issue
Block a user