0
Fork 0
mirror of https://github.com/TanStack/ai.git synced 2026-11-16 19:38:41 +00:00
Commit graph

6 commits

Author SHA1 Message Date
Tom Beckenham
669fd31d99
test(ai-persistence): check persistence adapter skills (#1921)
* test(ai-persistence): check persistence adapter skills

Type-check the Drizzle, Prisma, and custom chat recipes, and run the persistence conformance suite on the Drizzle and custom Postgres snippets.

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-27 11:25:47 +00:00
Tom Beckenham
5793d2faa4
chore(docs): resolve @fal-ai/client to the 1.11 types in the kiira check (#1657)
* fix(docs): resolve the bare @fal-ai/client import to the 1.11 types in kiira

The live-generation sample calls fal.realtime.open(), which only exists in
@fal-ai/client 1.11. tsconfig.docs.json mapped only the /realtime subpath,
so the bare import could resolve to the 1.10.1 copy under packages/ai-fal
and fail test:kiira. Map the bare import the same way, and move the kiira
pin and the media example to 1.11.0-alpha.5 so both fallback copies match.

Closes #1656

* chore: keep the lockfile change to the fal client only

The first install also re-resolved unrelated packages. One of those changes
gave ai-gemini a different @google/genai instance from ai-vertex, so the
vertex factory tests could not mock the SDK constructor and Coverage failed.
2026-10-08 16:19:56 +11:00
Cahid Arda
03865fe330
docs: add third-party adapters and the Upstash community adapter (#1589)
* docs: add third-party adapters and the Upstash community adapter

Add a Third-party adapters section to Build Your Own Adapter (persistence) and
Memory Adapters, and point Resumable Streams, the custom durability adapter page
and Locks at published third-party implementations. Add a Community Adapters page
for @upstash/agentkit-tanstack-ai, which backs persistence, resumable streams,
locks and memory with Upstash Redis.

Register the package in kiira's externalPackages, with its /persistence and
/memory subpaths mapped in tsconfig.docs.json, so the page's snippets are
type-checked.

* docs: pin @upstash/agentkit-tanstack-ai to ^0.1.1 for kiira; clarify memory scope default
2026-10-02 09:02:12 +02:00
Tom Beckenham
5ae2cd2c3c
feat(ui): render TextPart markdown with @tanstack/markdown (#1338)
* feat(ui): render TextPart markdown with @tanstack/markdown

Replace the per-framework unified stacks (react-markdown, @crazydos/vue-markdown,
solid-markdown + remark-gfm/rehype-raw/rehype-highlight/rehype-sanitize) in
@tanstack/ai-react, @tanstack/ai-vue and @tanstack/ai-solid with
@tanstack/markdown's streaming profile. React uses the /react adapter; Vue and
Solid render the escaped HTML string.

remarkPlugins/rehypePlugins/disableDefaultPlugins are replaced by extensions
and highlighter. The CJK e2e test no longer needs remark-cjk-friendly because
TanStack Markdown parses CJK bold natively.

Closes #1337

Claude-Session: https://claude.ai/code/session_01TAijLuNVgLkuzqddsFrbSp

* test(ui): cover partial markdown at every streaming boundary

Claude-Session: https://claude.ai/code/session_01TAijLuNVgLkuzqddsFrbSp

* docs(ui): document TextPart markdown rendering

Claude-Session: https://claude.ai/code/session_01TAijLuNVgLkuzqddsFrbSp

* chore: correct highlighting note in changeset

Claude-Session: https://claude.ai/code/session_01TAijLuNVgLkuzqddsFrbSp

* docs(ui): add TextPart highlighter setup and markdown migration

* fix(docs): type-check TextPart highlighter snippets and apply review notes

---------

Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
2026-09-15 18:06:54 +00:00
Tom Beckenham
c17bc951ca
feat: add generateWorld() and generateLiveVideo() for prompt-steerable sessions (#1321)
* feat: add generateWorld() activity and Reactor adapter

Add a session-based world generation activity, a first-party
@tanstack/ai-reactor adapter that mints scoped tokens for Orbis
and other Reactor world models, and a ts-react-world example app.

* feat: add reactorVideo adapter for live generateVideo sessions

Mint a scoped Reactor token from generateVideo() for Helios, FastH3,
Orbis, LongLive, and LTX. Live sessions return a token instead of a
download URL, so the browser connects with the js-sdk.

* feat: use BYOK in the ts-react-world example

Paste a Reactor key in the browser. The relay reads x-byok-reactor, then
REACTOR_API_KEY, and mints the session token.

* fix: unlock saved BYOK keys in the world example

Passkey storage locks the keyring after a reload. Show Unlock, treat
locked keys as saved, and call byok.prepare() before minting.

* fix: load Reactor wasm in the world example

Vite was pre-bundling @reactor-team/js-sdk, which broke the relative
import of dist/wasm/reactor_wasm.js. Exclude the SDK from optimizeDeps
and resolve that glue file from the package.

* fix: hydrate BYOK env and passkey peek like ts-react-chat

Call byok.ready() and getEnvKeyStatus() on mount so a refresh shows a
locked passkey key or REACTOR_API_KEY on the relay.

* fix: pre-bundle awaitqueue when the Reactor SDK is unbundled

Excluding @reactor-team/js-sdk from optimizeDeps left its CJS dependency
awaitqueue as a raw named import. Include it so Vite converts AwaitQueue.

* feat: add generateLive() and fold world into the media example

Mint live session tokens with generateLive(). reactorVideo and falLive
(H3 Max Director) use that activity. generateVideo stays the job path.

The media example now has Live and World tabs. The ts-react-world
example is removed.

* fix: play live video and open the key dialog on a missing key

Helios uses set_sr_scale, not set_resolution. Mute the video and
re-attach on unmute so Chrome shows frames. A missing key now
returns byokMissing and opens the header dialog. Seedance is a tab
on the media example. Sherif ignores the dual @fal-ai/client versions.

* fix: proxy fal Director auth and keep Orbis on World

WMA rejects a /tokens/ JWT as Key credentials. The media example opens
H3 Max Director through /api/fal/proxy with the real FAL_KEY. Orbis
stays on generateWorld only. Live and World share seed-image upload.

* ci: apply automated fixes

* fix: return the WMA app id from falLive and lock the proxy

generateLive() now puts fal-ai/minimax-h3-max-director on result.model
so wma(live.model) works. The example proxy only forwards WMA session
paths and Director /ice. Doc snippets type-check under kiira.

* refactor: rename generateLive to generateLiveVideo

The activity, adapter kind, fal factory, and createLive method now use
the LiveVideo name so they match generateLiveVideo().

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-08 16:23:59 +10:00
Alem Tuzlak
7fa93dec08
feat(ai-remix): add Remix 3 adapter and guitar chat example (#1289)
* feat(ai-remix): add Remix 3 adapter and guitar chat example

* docs(ai-remix): drop deprecated addToolApprovalResponse from createChatUI

* fix(ai-remix): satisfy oxlint, sherif, and kiira on CI

* feat(ai-remix): match landed createChatHook UI factory and add docs/ui/remix

* fix(ai-remix): satisfy remix types, knip, and kiira after main merge

* fix(docs): type-check Remix kiira fences instead of ignoring them

* fix(ai-remix): type-check createChat handle and ChatUIHost return

* ci: apply automated fixes

* fix(ai-remix): abort cleanup, match /chat in docs, bind demo locally

Address CodeRabbit on the Remix adapter: unsubscribe BYOK when the
handle is already aborted, reject audio stop after teardown, skip IME
Enter, stop hiding UI render failures, use /chat in both API snippets,
render the Input slot, validate HMR ports, and bind the demo server to
127.0.0.1.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-02 11:10:30 +02:00