import { Button } from "@tutti-os/ui-system/components"; import type { AgentActivityEditRetryRecoveryAction } from "@tutti-os/agent-activity-core"; import type { AgentGUIEditRetryPresentation } from "../model/agentGUIEditRetryModel"; import { translate } from "../../../i18n"; export function AgentGUIEditRetryStatus({ presentation, onRecover }: { presentation: AgentGUIEditRetryPresentation; onRecover: (action: AgentActivityEditRetryRecoveryAction) => Promise; }): React.JSX.Element | null { if (presentation.state === "ready") { return null; } const processing = presentation.state === "processing"; const message = processing ? translate("agentHost.agentGui.editRetryProcessing") : translate("agentHost.agentGui.editRetryNeedsAction"); const canReconcile = presentation.availableActions.includes("reconcile"); const canRetryReplacement = presentation.availableActions.includes("retry_replacement"); return (
{message} {!processing && (canReconcile || canRetryReplacement) ? (
{canReconcile ? ( ) : null} {canRetryReplacement ? ( ) : null}
) : null}
); }