fix frontend ID
This commit is contained in:
parent
042ffb421f
commit
7b860b3f6f
2 changed files with 7 additions and 4 deletions
|
|
@ -29,6 +29,7 @@ export interface ChunkResult {
|
|||
owner_email?: string;
|
||||
file_size?: number;
|
||||
connector_type?: string;
|
||||
index?: number;
|
||||
}
|
||||
|
||||
export interface File {
|
||||
|
|
@ -55,7 +56,7 @@ export interface File {
|
|||
export const useGetSearchQuery = (
|
||||
query: string,
|
||||
queryData?: ParsedQueryData | null,
|
||||
options?: Omit<UseQueryOptions, "queryKey" | "queryFn">,
|
||||
options?: Omit<UseQueryOptions, "queryKey" | "queryFn">
|
||||
) => {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
|
|
@ -184,7 +185,7 @@ export const useGetSearchQuery = (
|
|||
queryFn: getFiles,
|
||||
...options,
|
||||
},
|
||||
queryClient,
|
||||
queryClient
|
||||
);
|
||||
|
||||
return queryResult;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,9 @@ function ChunksPageContent() {
|
|||
return;
|
||||
}
|
||||
|
||||
setChunks(fileData?.chunks || []);
|
||||
setChunks(
|
||||
fileData?.chunks?.map((chunk, i) => ({ ...chunk, index: i + 1 })) || []
|
||||
);
|
||||
}, [data, filename]);
|
||||
|
||||
// Set selected state for all checkboxes when selectAll changes
|
||||
|
|
@ -246,7 +248,7 @@ function ChunksPageContent() {
|
|||
/>
|
||||
</div>
|
||||
<span className="text-sm font-bold">
|
||||
Chunk {chunk.page}
|
||||
Chunk {chunk.index}
|
||||
</span>
|
||||
<span className="bg-background p-1 rounded text-xs text-muted-foreground/70">
|
||||
{chunk.text.length} chars
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue