+
+```
+
+## Example: Tool Approval
+
+```vue
+
+
+
+
+
+
+
Approve: {{ part.name }}
+
+
+
+
+
+
+
+```
+
+## Example: Client Tools with Type Safety
+
+```vue
+
+
+
+
+
+
+
Tool executed: {{ part.name }}
+
+
+
+
+
+```
+
+## `createChatClientOptions(options)`
+
+Helper to create typed chat options (re-exported from `@tanstack/ai-client`).
+
+```typescript
+import {
+ clientTools,
+ createChatClientOptions,
+ type InferChatMessages
+} from "@tanstack/ai-client";
+
+// Create typed tools array (no 'as const' needed!)
+const tools = clientTools(tool1, tool2);
+
+const chatOptions = createChatClientOptions({
+ connection: fetchServerSentEvents("/api/chat"),
+ tools,
+});
+
+type Messages = InferChatMessages
;
+```
+
+## Types
+
+Re-exported from `@tanstack/ai-client`:
+
+- `UIMessage` - Message type with tool type parameter
+- `MessagePart` - Message part with tool type parameter
+- `TextPart` - Text content part
+- `ThinkingPart` - Thinking content part
+- `ToolCallPart` - Tool call part (discriminated union)
+- `ToolResultPart` - Tool result part
+- `ChatClientOptions` - Chat client options
+- `ConnectionAdapter` - Connection adapter interface
+- `InferChatMessages` - Extract message type from options
+
+Re-exported from `@tanstack/ai`:
+
+- `toolDefinition()` - Create isomorphic tool definition
+- `ToolDefinitionInstance` - Tool definition type
+- `ClientTool` - Client tool type
+- `ServerTool` - Server tool type
+
+## Next Steps
+
+- [Getting Started](../getting-started/quick-start) - Learn the basics
+- [Tools Guide](../guides/tools) - Learn about the isomorphic tool system
+- [Client Tools](../guides/client-tools) - Learn about client-side tools
diff --git a/docs/config.json b/docs/config.json
index 7cf47840..4b2259f2 100644
--- a/docs/config.json
+++ b/docs/config.json
@@ -19,7 +19,7 @@
},
{
"label": "Devtools",
- "to": "getting-started/devtools"
+ "to": "getting-started/devtools"
}
]
},
@@ -86,6 +86,10 @@
{
"label": "@tanstack/ai-solid",
"to": "api/ai-solid"
+ },
+ {
+ "label": "@tanstack/ai-vue",
+ "to": "api/ai-vue"
}
]
},
@@ -542,4 +546,4 @@
]
}
]
-}
+}
\ No newline at end of file