You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(transaction): satisfy kiira doc checks and eslint on clientTransaction cast
Add kiira group tags and explicit snippet types in transaction docs, and
document the phantom-only double cast in clientTransaction with an eslint
opt-out matching the chat activity pattern.
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: docs/transaction/overview.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Verb names are *your* domain language, not a fixed set of library nouns. A blog
21
21
22
22
`defineTransaction()` lives on the `/transaction` subpath of `@tanstack/ai`, and `useTransaction()` on the `/transaction` subpath of `@tanstack/ai-react` (Solid and Vue follow the same pattern; Svelte exports `createTransaction` from `@tanstack/ai-svelte/transaction`) — not the package root.
23
23
24
-
```ts
24
+
```ts group=overview-1
25
25
// lib/blog-studio.ts — define once; the API route only calls `.handler`
@@ -120,7 +121,7 @@ Both `txn.<oneShot>.run(input)` and `txn.<chatVerb>.sendMessage(...)` **resolve
120
121
121
122
You can declare **several verbs of the same kind** — including several chat verbs. Each gets its own conversation state, system prompt, and even model:
@@ -162,7 +163,9 @@ On the client, `txn.primaryChat` and `txn.summaryChat` are two fully independent
162
163
163
164
The recommended pattern is to **`defineTransaction` once in a shared module** and export a **`blogTxnDef`** client stub beside it via `clientTransaction<typeof blogTransaction>({ kinds })`. The page imports `blogTxnDef`; the API route imports `blogTransaction` and calls `.handler`. The kinds map is checked exhaustively against the server definition, so drift fails at compile time.
0 commit comments