From 99bf3772b50131ddbdee9e8c09435bb900f0ff3b Mon Sep 17 00:00:00 2001 From: Brent O'Neill Date: Fri, 19 Sep 2025 12:16:20 -0600 Subject: [PATCH] updated header for chunks page --- frontend/src/app/knowledge/chunks/page.tsx | 67 ++++++++++++++++------ 1 file changed, 50 insertions(+), 17 deletions(-) diff --git a/frontend/src/app/knowledge/chunks/page.tsx b/frontend/src/app/knowledge/chunks/page.tsx index 9385c474..254eb511 100644 --- a/frontend/src/app/knowledge/chunks/page.tsx +++ b/frontend/src/app/knowledge/chunks/page.tsx @@ -1,8 +1,10 @@ "use client"; import { + ArrowLeft, Building2, Cloud, + File as FileIcon, FileText, HardDrive, Loader2, @@ -21,6 +23,9 @@ import { type File, useGetSearchQuery, } from "../../api/queries/useGetSearchQuery"; +import { Label } from "@/components/ui/label"; +import { Checkbox } from "@/components/ui/checkbox"; +import { Input } from "@/components/ui/input"; // Function to get the appropriate icon for a connector type function getSourceIcon(connectorType?: string) { @@ -47,9 +52,14 @@ function ChunksPageContent() { const filename = searchParams.get("filename"); const [chunks, setChunks] = useState([]); + const [selectAll, setSelectAll] = useState(false); + const [queryInputText, setQueryInputText] = useState( + parsedFilterData?.query ?? "" + ); + // Use the same search query as the knowledge page, but we'll filter for the specific file const { data = [], isFetching } = useGetSearchQuery("*", parsedFilterData); - + console.log({ data }); // Extract chunks for the specific file useEffect(() => { if (!filename || !(data as File[]).length) { @@ -98,30 +108,53 @@ function ChunksPageContent() { >
{/* Header */} -
-
- -
-

Document Chunks

-

- {decodeURIComponent(filename)} -

+
+
+
+ setSelectAll(checked === true)} + /> + +
+
+ setQueryInputText(e.target.value)} + placeholder="Search chunks..." + className="flex-1 bg-muted/20 rounded-lg border border-border/50 px-4 py-3 focus-visible:ring-1 focus-visible:ring-ring" + /> +
-
+ {/*
{!isFetching && chunks.length > 0 && ( {chunks.length} chunk{chunks.length !== 1 ? "s" : ""} found )} -
+
*/}
{/* Content Area - matches knowledge page structure */}