fix frontend ID

This commit is contained in:
Brent O'Neill 2025-10-03 09:08:33 -06:00
parent 042ffb421f
commit 7b860b3f6f
2 changed files with 7 additions and 4 deletions

View file

@ -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;

View file

@ -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