docs(ai-transport): rewrite Vercel AI SDK framework guide to match Matt's wireframe (non-WDK pass)#3365
Draft
docs(ai-transport): rewrite Vercel AI SDK framework guide to match Matt's wireframe (non-WDK pass)#3365
Conversation
…reframe (non-WDK pass) Replace the existing Vercel AI SDK framework guide content end-to-end with the eight-section structure from Matt's wireframe: opening + drop-in framing, what each layer covers, how they fit together (architecture + code swap), try it, six capability sections, what developers are building around, when you need AI Transport, and a read-next list. Targets developers using Vercel AI SDK without the Workflow Dev Kit; a WDK-aware pass is a separate change. Removes the previous Vercel- first / problem-first framing and the implementation-detail walkthrough of UIMessageCodec, useChatTransport and useMessageSync; those belong in the Vercel integration API reference, not on the framework guide.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What this changes
Replaces the existing Vercel AI SDK framework guide end-to-end with the eight-section structure from Matt O'Riordan's wireframe (
framework-vercel-ai-sdk-ui.md): drop-in opening, what each layer covers, how they fit together (architecture + code swap), try it, six capability sections, what developers build around, when you need AI Transport, and a read-next list.Targets developers using Vercel AI SDK without the Workflow Dev Kit. A WDK-aware pass is a separate change.
Source
framework-vercel-ai-sdk-ui.md(Drive ID1-fXntKfEfIh8DOhefc-r9t33SS51nMu1)CROSS-CUTTING-CONVENTIONS.md(Drive ID17jXq4Z2eSuigLcfT-jvK2wV9Q0R-4QjM)PRINCIPLES.md(Drive ID1-1LUmRGc4A5npSl0vMhzeOP7orTzoYQ9)fiona-notes/ait-docs/vercel-ai-sdk-guide-edits.mdStyle adjustments applied to the lifted prose
useChat,ChatTransport,useClientTransport,useChatTransport,useCompletion,streamText,generateText.useClientTransport({ channelName: 'my-session' })plus a token-endpoint cross-link, never an embedded API key (per CROSS-CUTTING-CONVENTIONS.md and PRINCIPLES.md §18).Decisions deferred to reviewer
Card 2 in section 5: kept Matt's combined "Session continuity" form. Alternative split into multi-device + multi-participant cards (Fiona's positioning treats them as two distinct axes). Suggested split if you want to apply it (em dashes already removed):
Card 1 in section 5: kept Matt's "Durable streaming" title. Alternative: "Resumable streams" to match Fiona's demo intro positioning. Trivial swap if preferred.
Code form: kept the three-line form. The Vercel integration API reference (
/docs/ai-transport/api-reference/vercel) confirms the canonical surface isuseClientTransportthenuseChatTransportthenuseChat. The wireframe's one-lineuseChat({ transport: ablyTransport({...}) })is aspirational and does not reflect what@ably/ai-transport/vercel/reactexposes. Action needed: SDK-or-docs reconciliation. The wireframe's "One line." framing was dropped from the prose so the page does not claim something the SDK does not deliver. If product wants to keep the "one line" story, the SDK needs a single combined factory; if not, the canonical drop-in framing on this page, the demo intro, and the canonical positioning should all settle on "only the transport changes" (no line count).Live demo URL: placeholder. "Try it" links to
#live-example-placeholderwith a TODO comment in the MDX source. Launch blocker. Before publish: confirm a public demo URL with the demo team and replace.Architecture diagram: ASCII in a
<Code>block. The repo uses PNG images for diagrams (e.g.images/content/diagrams/ai-transport-before-and-after.png); no Mermaid usage detected. ASCII is the lowest-friction placeholder. Recommend the design team produces a functional, annotated illustration matching PRINCIPLES.md §16 before publish.Capability card link targets. Mapped to existing feature pages where possible:
/docs/ai-transport/features/reconnection-and-recoverytoken-streaming./docs/ai-transport/features/multi-device/docs/ai-transport/features/interruptioninterruption.mdxis the closest.cancellation.mdxis the alternative./docs/ai-transport/features/agent-presence/docs/ai-transport/features/human-in-the-loop/docs/ai-transport/concepts/sessionsRead-next 2x2. No sibling Vercel AI SDK Core framework guide exists yet (only a Core SDK getting-started page), so there is no peer page to align verbatim against. The four targets picked: Get started, How it works (concepts/sessions), Browse features (token-streaming as the entry point), API reference. The wireframe's fourth card was "Guides"; AI Transport has no
guides/section innav/aitransport.ts, so this substitutes "API reference". Swap to aguides/link once that section exists.Out of scope
ably ai-transport session inspectCLI command fromCROSS-CUTTING-CONVENTIONS.md. Both are unbuilt; referencing them on this page would be premature.How to review
Compare side-by-side with the wireframe in Drive (
framework-vercel-ai-sdk-ui.md). The structural shape matches exactly; the prose matches the wireframe with em dashes removed and the style adjustments listed above.Then check the deferred decisions and confirm the route on each before this leaves draft.
Things in the wireframe that didn't translate cleanly
<Tiles>, which expects icons and is built for nav (e.g. tech-stack tiles ongetting-started/index.mdx). I used H3 + paragraph + "Learn more" link, matching the "Features" pattern inai-transport/index.mdx. A proper card grid is a design + components task, not content.LiveExampleCardMDX component if other framework pages will use it.