diff --git a/frontend/src/app/knowledge/page.tsx b/frontend/src/app/knowledge/page.tsx index 9cd28433..e544d8f3 100644 --- a/frontend/src/app/knowledge/page.tsx +++ b/frontend/src/app/knowledge/page.tsx @@ -2,8 +2,10 @@ import { themeQuartz, + type CheckboxSelectionCallbackParams, type ColDef, type GetRowIdParams, + type ValueFormatterParams, } from "ag-grid-community"; import { AgGridReact, type CustomCellRendererProps } from "ag-grid-react"; import { Cloud, FileIcon, Globe } from "lucide-react"; @@ -130,7 +132,7 @@ function SearchPage() { { field: "filename", headerName: "Source", - checkboxSelection: (params: CustomCellRendererProps) => + checkboxSelection: (params: CheckboxSelectionCallbackParams) => (params?.data?.status || "active") === "active", headerCheckboxSelection: true, initialFlex: 2, @@ -172,7 +174,7 @@ function SearchPage() { { field: "size", headerName: "Size", - valueFormatter: (params: CustomCellRendererProps) => + valueFormatter: (params: ValueFormatterParams) => params.value ? `${Math.round(params.value / 1024)} KB` : "-", }, { @@ -182,13 +184,13 @@ function SearchPage() { { field: "owner", headerName: "Owner", - valueFormatter: (params: CustomCellRendererProps) => + valueFormatter: (params: ValueFormatterParams) => params.data?.owner_name || params.data?.owner_email || "—", }, { field: "chunkCount", headerName: "Chunks", - valueFormatter: (params: CustomCellRendererProps) => + valueFormatter: (params: ValueFormatterParams) => params.data?.chunkCount?.toString() || "-", }, {