import React from 'react'; export type AgentStopSize = 'sm' | 'md' | 'lg'; export interface AgentStopProps extends Omit, 'type' | 'children'> { /** Called when the user asks the run to stop. */ onStop: () => void; /** * The request is in flight. The control stays visible and keeps its place; * it does not disappear while the thing it cancels is still running. */ isStopping?: boolean; /** Visible label. */ label?: string; /** Visible label once `isStopping` is set. */ stoppingLabel?: string; size?: AgentStopSize; /** * Bind Escape, at the document, to stop the run. * * Off by default and deliberately so: Escape already means "dismiss the * thing in front of me" to every modal, popover and menu in this system, and * a document-level handler would cancel a background run when the user meant * to close a dialog. Turn it on only where the run IS the foreground task. */ stopOnEscape?: boolean; } /** * AgentStop — the always-visible way to end a run. * * NOT OPTIONAL, AND NOT BEHIND A MENU. A user who cannot stop an agent is * watching it, not supervising it. Human oversight of an automated process is * a compliance surface in regulated contexts, not a UX preference, and the * control that provides it has to be present and reachable at the moment it is * wanted — not two clicks into an overflow menu. * * WHY IT IS NOT JUST `