feat(examples/ag-ui): approval-card parity for human-in-the-loop#649
Merged
Conversation
…rrupts
The minimal ag-ui example had no interrupt UI, so request_approval paused with
no card (interrupt parity gap vs examples/chat). Add <chat-interrupt-panel>
gated on agent.interrupt(), and resolve via AG-UI's resume path —
submit({ resume }) (forwarded as forwardedProps.command.resume) — mapping the
accept/edit/respond/ignore actions like the canonical demo.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The minimal
examples/ag-uiapp rendered no interrupt UI, so arequest_approvalinterrupt just paused the run with nothing on screen — the parity gap vsexamples/chat(and why the homepage AG-UI demo loop couldn't show the approval scene).Adds the approval card, mirroring the canonical demo:
<chat-interrupt-panel [agent] (action)="onInterruptAction($event)">, gated onagent.interrupt().onInterruptActionmaps the accept/edit/respond/ignore vocabulary to a resume payload and replays via AG-UI's resume path —submit({ resume }), which the adapter forwards asforwardedProps.command.resume(not the LangGraphsubmit(null,{command})shape).Existing e2e specs are unaffected (panel only renders when an interrupt is active).
nx lint+nx buildgreen locally.Test Plan
examples/ag-ui — e2e+ build green.request_approvalinterrupt shows the approval card; Accept resumes the run.Follow-up (not in this PR)
interrupt-approvale2e spec (needs an aimock approval fixture) would lock this in, matchingexamples/chat.🤖 Generated with Claude Code