getInterrupt
Read the interrupt a paused agent shows first, if any. A run may pause on
several at once; agent.interrupts() lists them all.
import { getInterrupt } from '@threadplane/angular/chat';Declaration · overload 1
export declare function getInterrupt(agent: Agent): AgentInterrupt | undefined;Parameters
agent· requiredAgentThe agent to inspect.
Returns
AgentInterrupt | undefinedThe first pending AgentInterrupt, or undefined when the
agent is not waiting on one.
Examples
const interrupt = getInterrupt(agent);
if (interrupt) agent.resume?.([{ interruptId: interrupt.id, status: 'resolved', value: 'approved' }]);