mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 06:54:28 +00:00
feat(search): implement multi-chunk semantic search with segment timestamps
This commit is contained in:
@@ -66,6 +66,8 @@ export const assetInfoSchema = z.object({
|
||||
creator: userInfoSchema.nullable().optional(),
|
||||
fieldValues: z.array(fieldValueInfoSchema).optional(),
|
||||
sortIndex: z.string().optional().nullable(),
|
||||
startTime: z.number().optional().nullable(),
|
||||
endTime: z.number().optional().nullable(),
|
||||
|
||||
media: z
|
||||
.object({
|
||||
|
||||
+1
-4
@@ -44,9 +44,6 @@ export type SearchOperator = z.infer<typeof searchOperatorSchema>
|
||||
export const searchAssetTypeSchema = z.enum(['file', 'folder'])
|
||||
export type SearchAssetType = z.infer<typeof searchAssetTypeSchema>
|
||||
|
||||
export const searchModeSchema = z.enum(['name', 'content', 'all']).optional().default('name')
|
||||
export type SearchMode = z.infer<typeof searchModeSchema>
|
||||
|
||||
export const searchFilterSchema = z.object({
|
||||
operator: searchOperatorSchema.optional().default('AND'),
|
||||
conditions: z.array(searchConditionSchema).optional().default([]),
|
||||
@@ -56,7 +53,7 @@ export const searchFilterSchema = z.object({
|
||||
showSymlink: z.boolean().optional(),
|
||||
recursively: z.boolean().optional().default(true),
|
||||
query: z.string().optional(),
|
||||
searchMode: searchModeSchema.default('name'),
|
||||
isSemantic: z.boolean().optional().default(false),
|
||||
})
|
||||
export type SearchFilter = z.infer<typeof searchFilterSchema>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user