Repository navigation
feat(a2ui): upgrade a2ui packages to ^0.10.0. - #520
Conversation
…og implementation.
|
@wyf7107 I think I can't click "Merge" on this PR; would you mind landing this? Thanks! |
|
Yeah please do not manually click merge |
Add a provider to connect ngx-markdown to A2UI "MarkdownRenderer" token. (See a2ui-project/a2ui#647)
|
Hey team @wyf7107 @DeanChensj, after some testing I realized that in addition to making the markdown dependency explicit, we needed to hook up the current markdown renderer to A2UI for it to conform to A2UI's "MarkdownRenderer" interface. This is used to render markdown content inside A2UI components. I had to write a small bridge between the existing ngx-markdown provider and A2UI's. See The testing is not very good, because I would have liked to verify that the (Related: a2ui-project/a2ui#647) PTAL!
Don't worry, I don't have permissions to do that; I don't even see the button :P |
|
Woot! Thanks! Continuing in cl/978099759 |
Since the @a2ui 0.10 bump (google#520), web_core's v0.8 processor zod-validates and throws where 0.8.0 tolerated. Uncaught, that escapes ngOnChanges and breaks change detection for the whole chat view; a malformed payload should break only its own widget. `processMessages` is now wrapped in try/catch, and two new canvas specs cover it: one asserts nothing is logged on a clean message, the other that a throwing processor is contained, still logged, and leaves surfaceId derivable so a later valid message recovers. Also drop the dead A2uiCanvasComponent import in chat-panel (not in that component's `imports`, unused in its template). The /v0_8 import pinning, the `Types` source fix and the markdown provider from the original version of this commit are already on main via google#520 (`provideA2uiMarkdown()`), so they are dropped here.
And import v0.8 code from the
v0_8submodules explicitly, instead of importing from the root of the package (which is getting cleared up to allow for v1.0).This PR:
@a2uiimports to^0.10.0(latest major version).@a2ui/litthat have since moved to@a2ui/web_core, which is added as an explicit dependency.prismjs, which is used at runtime and was preventing me from running tests, but it seems appropriate in this app.Testing
Everything seems to build, and I ran
npm run test:Issues