From 2508d0fbb3793d80d50d98b8ac98ba588d4ba0ea Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Sat, 26 Jul 2025 00:27:39 +0530 Subject: [PATCH] (fix:chunks) preserve paths --- frontend/src/components/DocumentChunks.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/DocumentChunks.tsx b/frontend/src/components/DocumentChunks.tsx index ccdd5129..c7ed739f 100644 --- a/frontend/src/components/DocumentChunks.tsx +++ b/frontend/src/components/DocumentChunks.tsx @@ -156,14 +156,18 @@ const DocumentChunks: React.FC = ({ const handleAddChunk = (title: string, text: string) => { try { + const metadata = { + source: path || documentName, + source_id: documentId, + title: title, + }; + userService .addChunk( { id: documentId, text: text, - metadata: { - title: title, - }, + metadata: metadata, }, token, )