feat(a2ui): client-side functions (Phase 2 of the v0.9 migration) - #818
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
formatString/formatNumber/formatCurrency/formatDate/pluralize/and/or/not resolve through createA2uiFunctionRegistry(); functionCall actions route to a2ui:localAction (openUrl opens with noopener). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Aug 17, 2026
feat(a2ui): live sendDataModel round-trip + capabilities helper (Phase 4 of the v0.9 migration)
#820
Merged
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
Phase 2 of the A2UI v0.9.1 migration (follows #817): client-side function execution per the official basic-catalog function schemas.
@threadplane/a2ui: newcreateA2uiFunctionRegistry()with the standard set —formatString(full${...}interpolation: absolute/relative JSON-pointer paths, nested named-arg calls like${formatDate(value:${/d}, format:'yyyy-MM-dd')},\${escape; single-pass scanner, no backtracking regexes),formatNumber,formatCurrency,formatDate(TR35 pattern subset),pluralize(Intl.PluralRules),and/or/not.resolveDynamicgains an optional registry parameter; function args resolve recursively (bindings and nested calls); unknown names resolve toundefinedwith a one-time warning. Registry is extensible via overrides.@threadplane/chat:surfaceToSpecresolves every dynamic value through the standard registry, andaction.functionCallnow wires to the existinga2ui:localActionhandler (consumer handlers take priority; built-inopenUrlopens a new tab withnoopener).Additive and non-breaking. Plan:
docs/superpowers/plans/2026-08-17-a2ui-v09-phase2-functions.md.Verification
libs/a2ui86 unit tests (26 new for functions),libs/chat1128 — green; both libs build + lint cleannx affected -t lint test build: green except the pre-existingcockpit-telemetry:lintworktree-environment failure (untouched project, posthog-js specifier vs local install)formatCurrency+formatString; the surface rendered$1,234.50andThanks, Ada!— both values computed client-side by the registry from the LLM's{call}emissions.🤖 Generated with Claude Code