Skip to content

Give Bots the whole standard catalog but four - #875

Open
guidovizoso wants to merge 1 commit into
mainfrom
a2ui-standard-catalog
Open

guidovizoso wants to merge 1 commit into
mainfrom
a2ui-standard-catalog

Conversation

@guidovizoso

Copy link
Copy Markdown
Collaborator

What this changes

Bots can now draw from CopilotKit's whole standard catalog on A2UI 1.0, minus four components: 65 components in place of the 18 A2UI basic ones that #874 kept.

Newly available: tables, charts, grids, carousels, badges, markdown, code, maths, selects, radio groups, segmented controls, popovers, tooltips, entity cards and image grids, among others. The charts take the gallery's series colours, so a series looks the same in either kind of chart.

Left out:

  • Map: needs maplibre-gl, which OpenBot doesn't ship. Without it the SDK draws a list of places, which the model would then be promising as a map.
  • Favicon, LinkCard and Citation: they load site icons from https://www.google.com/s2/favicons, which would send every linked domain to Google.

The omitted list is OMITTED_STANDARD_COMPONENTS in app/src/lib/copilot/a2ui.ts. A test checks the catalog contains exactly the standard catalog minus that list.

Worth knowing:

  • No admin control. As with the 18 before, the components aren't listed in the components gallery, and an admin can't turn one off for a Bot. OPENBOT_GENERATIVE_UI=false still switches them all off.
  • Video plays YouTube links. It shows a thumbnail from i.ytimg.com and plays the video through youtube-nocookie.com. That was already true of the A2UI 1.0 Video in Upgrade to CopilotKit 1.83 and A2UI 1.0 #874.
  • HtmlView. It draws the model's HTML in an iframe with an empty sandbox, so no scripts run and the HTML can't reach the page.

Where it runs

  • New state that outlives a request? None. The catalog is static code in the browser bundle.
  • What happens on the second replica? Nothing different.
  • Anything serialised? No.
  • Anything fanned out to a browser? No.
  • New listener, port, or schedule? None.

Boundary and audit

  • Every acting call still goes through the gateway. Drawing a surface isn't an acting call.
  • No new refusals or failures. The runtime refuses a component outside the catalog and returns that to the model in the tool result, as before.
  • Nothing new is trusted from the client.

Changelog

  • "Generated interfaces use A2UI 1.0" under Unreleased is rewritten for the larger catalog and the four exclusions.

Proof

  • Checks: format:check, lint and typecheck pass.
  • App tests (bun test ./app from the root): 1687 pass, 10 fail. All 10 are the new-bot-sheet.test.tsx failures that main shows when the whole suite runs. The file passes when it runs alone.
  • Live, with General Assistant:
    • Asked through render_ui for a Table of three cities and a LinkCard, it drew the table (Tokyo, New York City, London) and left the LinkCard out.
    • No image on the page loaded from Google.

A Bot now draws from CopilotKit's standard catalog on A2UI 1.0, 65
components, rather than only its 18 A2UI basic ones. Map stays out
because OpenBot does not ship maplibre-gl. Favicon, LinkCard and Citation
stay out because they load site icons from Google's favicon service,
which would send every linked domain to Google.

The charts take the gallery's series colours again.

This branch has not been deployed

No deployments
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