Compare commits
8 commits
main
...
add-globe-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ced7a5ee9f | ||
|
|
93f91350eb | ||
|
|
ad372e7f47 | ||
|
|
7301fd8a44 | ||
|
|
c718e21eea | ||
|
|
5db01049bd | ||
|
|
ae4925cd56 | ||
|
|
5654620989 |
1 changed files with 331 additions and 320 deletions
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue