diff --git a/web/src/interfaces/database/knowledge.ts b/web/src/interfaces/database/knowledge.ts index 0740ac91e..b8fb2c3a3 100644 --- a/web/src/interfaces/database/knowledge.ts +++ b/web/src/interfaces/database/knowledge.ts @@ -101,6 +101,7 @@ export interface ITestingChunk { vector_similarity: number; highlight: string; positions: number[][]; + docnm_kwd: string; } export interface ITestingDocument { diff --git a/web/src/pages/search/index.less b/web/src/pages/search/index.less index ae7d77cca..f953d7c6f 100644 --- a/web/src/pages/search/index.less +++ b/web/src/pages/search/index.less @@ -3,7 +3,6 @@ background-size: cover; .card { width: 100%; - cursor: pointer; :global(.ant-card-body) { padding: 14px; } @@ -101,6 +100,9 @@ font-style: normal; } } + .documentReference { + cursor: pointer; + } } .answerWrapper { margin-top: 16px; diff --git a/web/src/pages/search/index.tsx b/web/src/pages/search/index.tsx index 3cba299ab..f40b417a0 100644 --- a/web/src/pages/search/index.tsx +++ b/web/src/pages/search/index.tsx @@ -1,3 +1,4 @@ +import FileIcon from '@/components/file-icon'; import HightLightMarkdown from '@/components/highlight-markdown'; import { ImageWithPopover } from '@/components/image'; import IndentedTree from '@/components/indented-tree/indented-tree'; @@ -56,7 +57,6 @@ const SearchPage = () => { sendingLoading, relatedQuestions, mindMap, - mindMapLoading, searchStr, loading, isFirstRender, @@ -74,11 +74,10 @@ const SearchPage = () => { const isMindMapEmpty = useMemo(() => { return ( - !mindMapLoading && - ((Array.isArray(mindMap?.children) && mindMap.children.length === 0) || - !Array.isArray(mindMap?.children)) + (Array.isArray(mindMap?.children) && mindMap.children.length === 0) || + !Array.isArray(mindMap?.children) ); - }, [mindMap, mindMapLoading]); + }, [mindMap]); const InputSearch = ( { className={styles.chunks} renderItem={(item) => ( - - clickDocumentButton(item.doc_id, item as any) - } - > + - - - {item.content_with_weight} - - - } - > -
-
+ + + + {item.content_with_weight} + + + } + > +
+
+ + clickDocumentButton( + item.doc_id, + item as any, + ) + } + > + + {item.docnm_kwd} + +
@@ -220,15 +231,11 @@ const SearchPage = () => {
- {mindMapLoading ? ( - - ) : ( - - )} +
)}