'use client' import { getMonitoringAgent, getMonitoringAgentHarnesses, type MonitoringAgentHarnessSetup, } from '~/data/monitoring-agents.utils' import { Sparkles } from 'lucide-react' import { useTheme } from 'next-themes' import { type ReactNode } from 'react' import ReactMarkdown from 'react-markdown' import { ConnectionIcon } from 'ui-patterns/McpUrlBuilder' import { AiPrompt } from './AiPrompt' import { TabPanel, Tabs } from './Tabs' type AgentSetupProps = { id: string } const markdownComponents = { p: ({ children }: { children?: ReactNode }) => <>{children}, a: ({ href, children }: { href?: string; children?: ReactNode }) => { if (!href) return <>{children} const external = /^(?:[a-z][a-z0-9+\-.]*:|\/\/)/i.test(href) return ( {children} ) }, code: ({ children }: { children?: ReactNode }) => ( {children} ), } function HarnessBody({ harness }: { harness: MonitoringAgentHarnessSetup }) { return ( <>

{harness.intro}

    {harness.steps.map((step) => (
  1. {step}
  2. ))}
{harness.note && (

{harness.note}

)}

{harness.label} docs

) } function AgentSetup({ id }: AgentSetupProps) { const agent = getMonitoringAgent(id) const harnesses = getMonitoringAgentHarnesses(agent) const { resolvedTheme } = useTheme() const theme = resolvedTheme?.includes('dark') ? 'dark' : 'light' return ( }> {harnesses.map((harness) => ( } > ))} ) } export { AgentSetup } export type { AgentSetupProps }