Skip to main content

Functions

InterruptHandler()

Defined in: components/assistant-ui/interrupt-handler.tsx:68 React Component to handle the LangGraph suspended (interrupted) state. Intercepts the human-in-the-loop validation checkpoint raised by the backend human_intervention_node via LangGraph’s native interrupt() API. The payload (instruction + current translation state + query-equivalence deep diffs) is surfaced through useLangGraphInterruptState(). The user can Accept the translation or Reject it with targeted feedback; the decision is resumed back into the graph with Command(resume={ decision, feedback }). The interrupt is captured live (requires "updates" in the stream’s streamMode) and restored on reload via the runtime’s load() callback, so the card reappears when an interrupted conversation is reopened from the thread list.

Returns

Element | null The interrupt control card, or null if execution is not suspended.