Skip to content

Refactor UI adapter#143

Merged
anbuzin merged 13 commits into
mainfrom
refactor-ui-adapter
May 22, 2026
Merged

Refactor UI adapter#143
anbuzin merged 13 commits into
mainfrom
refactor-ui-adapter

Conversation

@anbuzin
Copy link
Copy Markdown
Collaborator

@anbuzin anbuzin commented May 19, 2026

This wasn't meant to be a +3K lines PR, but most of it is just shuffling the same code around, so it might be easier to review code directly as opposed to looking at diffs.

  1. Uses AI SDK UI protocol metadata to roundtrip message IDs and handle framework -> UI -> framework message transforms more cleanly.
  2. Replaces if-else chains with match-case
  3. Prunes some dead code and inlines useless helpers
  4. Gathers code into a smaller number of files (message and event projections, one file for each conversion direction, a small number of shared helpers).

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

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

Project Deployment Actions Updated (UTC)
ai-python Ready Ready Preview, Comment May 22, 2026 8:12pm

Comment thread src/ai/agents/ui/ai_sdk/inbound_messages.py Outdated
Comment thread src/ai/agents/ui/ai_sdk/outbound_messages.py
Comment thread src/ai/agents/ui/ai_sdk/outbound_messages.py Outdated
Comment thread src/ai/agents/ui/ai_sdk/id_utils.py Outdated
@anbuzin anbuzin merged commit 96694eb into main May 22, 2026
7 checks passed
@anbuzin anbuzin deleted the refactor-ui-adapter branch May 22, 2026 20:23
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.

2 participants