"use client"; import { ArrowLeft, Calendar, Check, ExternalLink, FileText, Github, HardDrive, Loader2, Mail, MessageSquare, Zap, } from "lucide-react"; import Image from "next/image"; import type { FC } from "react"; import { useState } from "react"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; interface ComposioToolkit { id: string; name: string; description: string; isIndexable: boolean; } interface ComposioToolkitViewProps { searchSpaceId: string; connectedToolkits: string[]; onBack: () => void; onConnectToolkit: (toolkitId: string) => void; isConnecting: boolean; connectingToolkitId: string | null; } // Available Composio toolkits const COMPOSIO_TOOLKITS: ComposioToolkit[] = [ { id: "googledrive", name: "Google Drive", description: "Search your Drive files and documents", isIndexable: true, }, { id: "gmail", name: "Gmail", description: "Search through your emails", isIndexable: true, }, { id: "googlecalendar", name: "Google Calendar", description: "Search through your events", isIndexable: true, }, { id: "slack", name: "Slack", description: "Search Slack messages", isIndexable: false, }, { id: "notion", name: "Notion", description: "Search Notion pages", isIndexable: false, }, { id: "github", name: "GitHub", description: "Search repositories and code", isIndexable: false, }, ]; // Get icon for toolkit const getToolkitIcon = (toolkitId: string, className?: string) => { const iconClass = className || "size-5"; switch (toolkitId) { case "googledrive": return ( Google Drive ); case "gmail": return ( Gmail ); case "googlecalendar": return ( Google Calendar ); case "slack": return ( Slack ); case "notion": return ( Notion ); case "github": return ( GitHub ); default: return ; } }; export const ComposioToolkitView: FC = ({ searchSpaceId, connectedToolkits, onBack, onConnectToolkit, isConnecting, connectingToolkitId, }) => { const [hoveredToolkit, setHoveredToolkit] = useState(null); // Separate indexable and non-indexable toolkits const indexableToolkits = COMPOSIO_TOOLKITS.filter((t) => t.isIndexable); const nonIndexableToolkits = COMPOSIO_TOOLKITS.filter((t) => !t.isIndexable); return (
{/* Header */}
{/* Back button */} {/* Header content */}
Composio

Composio

Connect 100+ apps with managed OAuth - no verification needed

Powered by Composio
{/* Content */}
{/* Indexable Toolkits (Google Services) */}

Google Services

Indexable

Connect Google services via Composio's verified OAuth app. Your data will be indexed and searchable.

{indexableToolkits.map((toolkit) => { const isConnected = connectedToolkits.includes(toolkit.id); const isThisConnecting = connectingToolkitId === toolkit.id; return (
setHoveredToolkit(toolkit.id)} onMouseLeave={() => setHoveredToolkit(null)} className={cn( "group relative flex flex-col p-4 rounded-xl border transition-all duration-200", isConnected ? "border-emerald-500/30 bg-emerald-500/5" : "border-border bg-card hover:border-violet-500/30 hover:bg-violet-500/5" )} >
{getToolkitIcon(toolkit.id, "size-5")}
{isConnected && ( Connected )}

{toolkit.name}

{toolkit.description}

); })}
{/* Non-Indexable Toolkits (Coming Soon) */}

More Integrations

Coming Soon

Connect these services for future indexing support. Currently available for connection only.

{nonIndexableToolkits.map((toolkit) => (
{getToolkitIcon(toolkit.id, "size-5")}
Soon

{toolkit.name}

{toolkit.description}

))}
{/* Info footer */}

Why use Composio?

Composio provides pre-verified OAuth apps, so you don't need to wait for Google app verification. Your data is securely processed through Composio's managed authentication.

); };