import { Check, Share2 } from 'lucide-react'; import type { ReactNode } from 'react'; const LOGO_CDN = 'https://logos.composio.dev/api'; const CONNECTIONS: { slug: string; name: string; owner: string; shared?: boolean }[] = [ { slug: 'slack', name: 'Slack', owner: 'workspace bot', shared: true }, { slug: 'github', name: 'GitHub', owner: 'Alice' }, { slug: 'gmail', name: 'Gmail', owner: 'Alice' }, ]; /** * SlackBotFlow — branded replacement for the plain `slack → server → agent` * mermaid diagram on the Slack bot example page. * * Reads left-to-right as the request loop: a Slack message arrives as a trigger * webhook, your server hands it to the Pi agent, and the agent works through a * per-user session that pins one shared workspace Slack connection alongside the * user's own connected apps. The reply flows back to Slack as the bot. * * Server component, no client JS. Adapts to light/dark via fd-* tokens. */ export function SlackBotFlow() { return (
{/* header strip — mono, matches the other branded flow visuals */}
slackbot.runtime listening in Slack
{/* ── Slack ──────────────────────────────────────────────── */}
Message
@mention or DM

trigger webhook

{/* ── Your server / agent ────────────────────────────────── */}
{'{ }'}
Pi agent
verifies + loops

Verifies the webhook signature, then calls the session's tools.

{/* ── Session (the hub) ──────────────────────────────────── */}
{/* footer caption */}
message trigger agent session (shared slack + user apps) reply
); } function Column({ children }: { children: ReactNode }) { return
{children}
; } function Lane({ label, accent = false }: { label: string; accent?: boolean }) { return (
); } /** * Directional connector shown between columns. Horizontal arrow on desktop, * vertical on stacked mobile so the flow still reads top-to-bottom. */ function Connector({ accent = false }: { accent?: boolean }) { const color = accent ? 'bg-[var(--composio-brand)]/40' : 'bg-fd-border'; const tip = accent ? 'border-l-[var(--composio-brand)]/50' : 'border-l-fd-border'; return ( ); } function Arrow() { return ( ); }