Skip to content

feat: handler injection context and consumer-extensible A2UI handlers#94

Merged
blove merged 5 commits into
mainfrom
feature/handler-injection-context
Apr 10, 2026
Merged

feat: handler injection context and consumer-extensible A2UI handlers#94
blove merged 5 commits into
mainfrom
feature/handler-injection-context

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Apr 10, 2026

Summary

  • Wrap all render-lib handler calls in runInInjectionContext — handlers can now call inject() to access Angular services
  • Add [handlers] input to ChatComponent, threaded to both generative-ui and A2UI surfaces
  • Refactor A2uiSurfaceComponent to look up functionCall.call names in consumer-provided handlers, with built-in openUrl as fallback

Test Plan

  • nx test render — 58 tests pass (including new injection context test)
  • nx test chat — 170 tests pass (including new consumer handler test)
  • CI passes on all targets

🤖 Generated with Claude Code

blove and others added 5 commits April 9, 2026 22:32
Wrap every handler call in emitFn with runInInjectionContext(this.parentInjector, …)
so handlers can safely call inject() to access Angular services. Adds a behavior-
validation test to document and verify the pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nput

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment Apr 10, 2026 5:43am

Request Review

@blove blove merged commit 0a6bded into main Apr 10, 2026
14 checks passed
@blove blove deleted the feature/handler-injection-context branch May 7, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant