Compare commits

...
Sign in to create a new pull request.

8 commits

Author SHA1 Message Date
Lucas Oliveira
ced7a5ee9f format 2025-10-06 15:35:51 -03:00
Lucas Oliveira
93f91350eb Merge remote-tracking branch 'origin/main' into add-globe-icon-text-html-url 2025-10-06 15:35:48 -03:00
Lucas Oliveira
ad372e7f47 fix formatting 2025-10-06 15:34:03 -03:00
Lucas Oliveira
7301fd8a44 removed wrong docs 2025-10-06 15:33:33 -03:00
Lucas Oliveira
c718e21eea Merge remote-tracking branch 'origin/main' into add-globe-icon-text-html-url 2025-10-06 14:40:46 -03:00
Edwin Jose
5db01049bd
Merge branch 'main' into add-globe-icon-text-html-url 2025-10-06 10:48:14 -04:00
Lucas Oliveira
ae4925cd56 changed page to get connector type as url 2025-10-03 18:06:52 -03:00
Edwin Jose
5654620989 Show globe icon for HTML documents in knowledge page
Updated getSourceIcon to display a globe icon for documents with 'text/html' mimetype, regardless of connector type. This improves visual identification of web-based documents in the grid.
2025-10-03 12:29:46 -04:00

View file

@ -2,7 +2,15 @@
import type { ColDef, GetRowIdParams } from "ag-grid-community"; import type { ColDef, GetRowIdParams } from "ag-grid-community";
import { AgGridReact, type CustomCellRendererProps } from "ag-grid-react"; import { AgGridReact, type CustomCellRendererProps } from "ag-grid-react";
import { Building2, Cloud, HardDrive, Search, Trash2, X } from "lucide-react"; import {
Building2,
Cloud,
Globe,
HardDrive,
Search,
Trash2,
X,
} from "lucide-react";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { import {
type ChangeEvent, type ChangeEvent,
@ -32,6 +40,8 @@ import { useDeleteDocument } from "../api/mutations/useDeleteDocument";
// Function to get the appropriate icon for a connector type // Function to get the appropriate icon for a connector type
function getSourceIcon(connectorType?: string) { function getSourceIcon(connectorType?: string) {
switch (connectorType) { switch (connectorType) {
case "url":
return <Globe className="h-4 w-4 text-muted-foreground flex-shrink-0" />;
case "google_drive": case "google_drive":
return ( return (
<SiGoogledrive className="h-4 w-4 text-foreground flex-shrink-0" /> <SiGoogledrive className="h-4 w-4 text-foreground flex-shrink-0" />
@ -138,7 +148,9 @@ function SearchPage() {
return ( return (
<div className="flex items-center overflow-hidden w-full"> <div className="flex items-center overflow-hidden w-full">
<div <div
className={`transition-opacity duration-200 ${isActive ? "w-0" : "w-7"}`} className={`transition-opacity duration-200 ${
isActive ? "w-0" : "w-7"
}`}
></div> ></div>
<button <button
type="button" type="button"
@ -182,7 +194,8 @@ function SearchPage() {
{ {
field: "chunkCount", field: "chunkCount",
headerName: "Chunks", headerName: "Chunks",
valueFormatter: (params: CustomCellRendererProps<File>) => params.data?.chunkCount?.toString() || "-", valueFormatter: (params: CustomCellRendererProps<File>) =>
params.data?.chunkCount?.toString() || "-",
}, },
{ {
field: "avgScore", field: "avgScore",
@ -316,9 +329,7 @@ function SearchPage() {
/> />
</div> </div>
)} )}
<Search <Search className="h-4 w-4 ml-1 flex-shrink-0 text-placeholder-foreground" />
className="h-4 w-4 ml-1 flex-shrink-0 text-placeholder-foreground"
/>
<input <input
className="bg-transparent w-full h-full ml-2 focus:outline-none focus-visible:outline-none font-mono placeholder:font-mono" className="bg-transparent w-full h-full ml-2 focus:outline-none focus-visible:outline-none font-mono placeholder:font-mono"
name="search-query" name="search-query"