"use client"; import { useOnboarding } from "@onboardjs/react"; import { Loader2 } from "lucide-react"; import { Button } from "@/components/ui/button"; import { CodeSnippet } from "@/components/common/code-snippet"; import { useGenerateEdgeKey } from "@/features/onboarding/hooks/use-generate-edge-key"; import type { OnboardingAgent } from "@/features/onboarding/types"; export const StepAgentKey = () => { const { next, state } = useOnboarding(); const agents = (state?.context.flowData.agents ?? []) as OnboardingAgent[]; return (

Connect your agent

Run the command below on your server. The next step waits for the agent to connect.

{agents.map((agent) => ( ))}
); }; const AgentKeyBlock = ({ agent }: { agent: OnboardingAgent }) => { const { data, isLoading } = useGenerateEdgeKey(agent.id); if (isLoading) { return (
Generating key for {agent.name}…
); } const command = `portabase agent "${agent.name}" --key ${data}`; return (

{agent.name}

); };