Skip to content

Commit

Permalink
feat: Click on the chunk on the search page to locate the correspondi…
Browse files Browse the repository at this point in the history
…ng file location infiniflow#2247 (infiniflow#2399)

### What problem does this PR solve?

feat: Click on the chunk on the search page to locate the corresponding
file location infiniflow#2247

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
  • Loading branch information
cike8899 authored Sep 13, 2024
1 parent fa4ed59 commit 697d32a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions web/src/interfaces/database/knowledge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export interface ITestingChunk {
vector: number[];
vector_similarity: number;
highlight: string;
positions: number[][];
}

export interface ITestingDocument {
Expand Down
7 changes: 6 additions & 1 deletion web/src/pages/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ const SearchPage = () => {
className={styles.chunks}
renderItem={(item) => (
<List.Item>
<Card className={styles.card}>
<Card
className={styles.card}
onClick={() =>
clickDocumentButton(item.doc_id, item as any)
}
>
<Space>
<ImageWithPopover
id={item.img_id}
Expand Down

0 comments on commit 697d32a

Please sign in to comment.