diff --git a/frontend/src/components/DocumentChunks.tsx b/frontend/src/components/DocumentChunks.tsx index f994b6f7..1cdef63f 100644 --- a/frontend/src/components/DocumentChunks.tsx +++ b/frontend/src/components/DocumentChunks.tsx @@ -152,30 +152,30 @@ const DocumentChunks: React.FC = ({ return (
{showHeader && ( -
+
-
- source - +
+ source + {documentName} {pathParts.length > 0 && ( <> - / + / {pathParts.map((part, index) => ( - + {part} {index < pathParts.length - 1 && ( - / + / )} ))} @@ -185,8 +185,8 @@ const DocumentChunks: React.FC = ({
)} -
-
+
+
{totalChunks > 999999 ? `${(totalChunks / 1000000).toFixed(2)}M` @@ -206,7 +206,7 @@ const DocumentChunks: React.FC = ({
{loading ? ( -
-
- -
-
- ) : ( -
- {filteredChunks.length === 0 ? ( -
- {t('settings.documents.noChunksAlt')} - {t('settings.documents.noChunks')} -
- ) : ( - filteredChunks.map((chunk, index) => ( -
+
+ +
+) : ( +
+ {filteredChunks.length === 0 ? ( +
+ {t('settings.documents.noChunksAlt')} + {t('settings.documents.noChunks')} +
+ ) : ( + filteredChunks.map((chunk, index) => ( +
diff --git a/frontend/src/components/FileTreeComponent.tsx b/frontend/src/components/FileTreeComponent.tsx index 6a61ca12..64a8e4b1 100644 --- a/frontend/src/components/FileTreeComponent.tsx +++ b/frontend/src/components/FileTreeComponent.tsx @@ -436,6 +436,7 @@ const FileTreeComponent: React.FC = ({ setSearchResults([]); }; + return ( <>
{renderPathNavigation()}
@@ -465,24 +466,29 @@ const FileTreeComponent: React.FC = ({ /> {searchQuery && ( -
- {searchResults.map((result, index) => ( -
handleSearchSelect(result)} - className={`flex items-center px-3 py-2 cursor-pointer hover:bg-[#ECEEEF] dark:hover:bg-[#27282D] ${index !== searchResults.length - 1 ? "border-b border-[#D1D9E0] dark:border-[#6A6A6A]" : "" - }`} - > - {result.isFile - - {result.path} - -
- ))} +
+ {searchResults.map((result, index) => { + const name = result.path.split('/').pop() || result.path; + + return ( +
handleSearchSelect(result)} + title={result.path} + className={`flex items-center px-3 py-2 cursor-pointer hover:bg-[#ECEEEF] dark:hover:bg-[#27282D] ${index !== searchResults.length - 1 ? "border-b border-[#D1D9E0] dark:border-[#6A6A6A]" : "" + }`} + > + {result.isFile + + {name} + +
+ ); + })} {searchResults.length === 0 && (
{t('settings.documents.noResults')} @@ -493,14 +499,14 @@ const FileTreeComponent: React.FC = ({
- setSelectedFile(null)} - path={selectedFile.id} - showHeader={false} - /> -
+ setSelectedFile(null)} + path={selectedFile.id} + showHeader={false} + /> +
) : (