import { ShieldCheck, ShieldX, ArrowRight } from "lucide-react"; import { Button } from "./ui/button"; import { cn } from "../lib/utils"; export interface ProjectAccessNoticeProps { agentName?: string; projectName?: string; ready: boolean; canManage: boolean; canRetry: boolean; onManage: () => void; onRetry: () => void; error?: Error | null; className?: string; } export function ProjectAccessNotice({ agentName = "This agent", projectName, ready, canManage, canRetry, onManage, onRetry, error, className }: ProjectAccessNoticeProps) { return
{ready ? : }

{ready ? "Project access is ready" : `${agentName} can’t access this project`}

{ready ? "The agent can now access the required project. Retry to continue with your saved message." : `This task needs ${projectName ?? "a project"} outside the agent’s allowed projects. The agent hasn’t started. Your message is saved.`}

{!ready && !canManage &&

A person with agent-management permission can add this project in the agent’s Permissions / Trust settings.

}
{ready ? canRetry && : }
{error &&

{error.message}

} {!ready &&
Run details
Stopped during
Workspace setup
Reason
Project outside allowed scope
Provider started
No
}
; }