@assistant-ui/mcp-docs-server 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/code-examples/with-ai-sdk-v5.md +24 -17
- package/.docs/organized/code-examples/with-assistant-transport.md +1599 -0
- package/.docs/organized/code-examples/with-cloud.md +11 -11
- package/.docs/organized/code-examples/with-external-store.md +9 -9
- package/.docs/organized/code-examples/with-ffmpeg.md +17 -16
- package/.docs/organized/code-examples/with-langgraph.md +33 -110
- package/.docs/organized/code-examples/with-parent-id-grouping.md +9 -9
- package/.docs/organized/code-examples/with-react-hook-form.md +17 -16
- package/.docs/raw/docs/api-reference/primitives/Thread.mdx +40 -8
- package/.docs/raw/docs/cloud/persistence/langgraph.mdx +42 -66
- package/.docs/raw/docs/copilots/assistant-frame.mdx +18 -16
- package/.docs/raw/docs/devtools.mdx +51 -0
- package/.docs/raw/docs/getting-started.mdx +2 -4
- package/.docs/raw/docs/guides/ToolUI.mdx +112 -37
- package/.docs/raw/docs/guides/Tools.mdx +170 -6
- package/.docs/raw/docs/migrations/react-langgraph-v0-7.mdx +324 -0
- package/.docs/raw/docs/runtimes/ai-sdk/use-chat.mdx +2 -2
- package/.docs/raw/docs/runtimes/custom/local.mdx +1 -1
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +55 -20
- package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +6 -5
- package/.docs/raw/docs/runtimes/mastra/overview.mdx +3 -3
- package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +13 -13
- package/.docs/raw/docs/ui/Thread.mdx +368 -5
- package/package.json +8 -8
- package/.docs/raw/docs/migrations/v0-7.mdx +0 -188
- package/.docs/raw/docs/migrations/v0-8.mdx +0 -160
- package/.docs/raw/docs/migrations/v0-9.mdx +0 -75
- package/.docs/raw/docs/ui/primitives/Thread.mdx +0 -197
|
@@ -1087,27 +1087,27 @@ export default nextConfig;
|
|
|
1087
1087
|
"dev": "next dev --turbo",
|
|
1088
1088
|
"build": "next build",
|
|
1089
1089
|
"start": "next start",
|
|
1090
|
-
"lint": "
|
|
1090
|
+
"lint": "eslint ."
|
|
1091
1091
|
},
|
|
1092
1092
|
"dependencies": {
|
|
1093
|
-
"@ai-sdk/openai": "^2.0.
|
|
1093
|
+
"@ai-sdk/openai": "^2.0.42",
|
|
1094
1094
|
"@assistant-ui/react": "workspace:*",
|
|
1095
1095
|
"@assistant-ui/react-ai-sdk": "workspace:*",
|
|
1096
1096
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
1097
1097
|
"@radix-ui/react-slot": "^1.2.3",
|
|
1098
1098
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
1099
|
-
"ai": "^5.0.
|
|
1099
|
+
"ai": "^5.0.59",
|
|
1100
1100
|
"class-variance-authority": "^0.7.1",
|
|
1101
1101
|
"clsx": "^2.1.1",
|
|
1102
1102
|
"jsonwebtoken": "^9.0.2",
|
|
1103
|
-
"lucide-react": "^0.
|
|
1104
|
-
"nanoid": "5.1.
|
|
1105
|
-
"next": "15.4
|
|
1106
|
-
"react": "19.
|
|
1107
|
-
"react-dom": "19.
|
|
1103
|
+
"lucide-react": "^0.544.0",
|
|
1104
|
+
"nanoid": "5.1.6",
|
|
1105
|
+
"next": "15.5.4",
|
|
1106
|
+
"react": "19.2.0",
|
|
1107
|
+
"react-dom": "19.2.0",
|
|
1108
1108
|
"remark-gfm": "^4.0.1",
|
|
1109
1109
|
"tailwind-merge": "^3.3.1",
|
|
1110
|
-
"tw-animate-css": "^1.
|
|
1110
|
+
"tw-animate-css": "^1.4.0"
|
|
1111
1111
|
},
|
|
1112
1112
|
"devDependencies": {
|
|
1113
1113
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
@@ -1116,9 +1116,9 @@ export default nextConfig;
|
|
|
1116
1116
|
"@types/react": "^19",
|
|
1117
1117
|
"@types/react-dom": "^19",
|
|
1118
1118
|
"eslint": "^9",
|
|
1119
|
-
"eslint-config-next": "15.4
|
|
1119
|
+
"eslint-config-next": "15.5.4",
|
|
1120
1120
|
"postcss": "^8",
|
|
1121
|
-
"tailwindcss": "^4.1.
|
|
1121
|
+
"tailwindcss": "^4.1.14",
|
|
1122
1122
|
"typescript": "^5"
|
|
1123
1123
|
}
|
|
1124
1124
|
}
|
|
@@ -999,23 +999,23 @@ export default nextConfig;
|
|
|
999
999
|
"dev": "next dev --turbo",
|
|
1000
1000
|
"build": "next build",
|
|
1001
1001
|
"start": "next start",
|
|
1002
|
-
"lint": "
|
|
1002
|
+
"lint": "eslint ."
|
|
1003
1003
|
},
|
|
1004
1004
|
"dependencies": {
|
|
1005
|
-
"@ai-sdk/openai": "^2.0.
|
|
1005
|
+
"@ai-sdk/openai": "^2.0.42",
|
|
1006
1006
|
"@assistant-ui/react": "workspace:*",
|
|
1007
1007
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
1008
1008
|
"@radix-ui/react-slot": "^1.2.3",
|
|
1009
1009
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
1010
1010
|
"class-variance-authority": "^0.7.1",
|
|
1011
1011
|
"clsx": "^2.1.1",
|
|
1012
|
-
"lucide-react": "^0.
|
|
1013
|
-
"next": "15.4
|
|
1014
|
-
"react": "19.
|
|
1015
|
-
"react-dom": "19.
|
|
1012
|
+
"lucide-react": "^0.544.0",
|
|
1013
|
+
"next": "15.5.4",
|
|
1014
|
+
"react": "19.2.0",
|
|
1015
|
+
"react-dom": "19.2.0",
|
|
1016
1016
|
"remark-gfm": "^4.0.1",
|
|
1017
1017
|
"tailwind-merge": "^3.3.1",
|
|
1018
|
-
"tw-animate-css": "^1.
|
|
1018
|
+
"tw-animate-css": "^1.4.0"
|
|
1019
1019
|
},
|
|
1020
1020
|
"devDependencies": {
|
|
1021
1021
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
@@ -1023,9 +1023,9 @@ export default nextConfig;
|
|
|
1023
1023
|
"@types/react": "^19",
|
|
1024
1024
|
"@types/react-dom": "^19",
|
|
1025
1025
|
"eslint": "^9",
|
|
1026
|
-
"eslint-config-next": "15.4
|
|
1026
|
+
"eslint-config-next": "15.5.4",
|
|
1027
1027
|
"postcss": "^8",
|
|
1028
|
-
"tailwindcss": "^4.1.
|
|
1028
|
+
"tailwindcss": "^4.1.14",
|
|
1029
1029
|
"typescript": "^5"
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
@@ -1191,6 +1191,7 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
1191
1191
|
```typescript
|
|
1192
1192
|
/// <reference types="next" />
|
|
1193
1193
|
/// <reference types="next/image-types/global" />
|
|
1194
|
+
/// <reference path="./.next/types/routes.d.ts" />
|
|
1194
1195
|
|
|
1195
1196
|
// NOTE: This file should not be edited
|
|
1196
1197
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
|
@@ -1221,17 +1222,17 @@ export default nextConfig;
|
|
|
1221
1222
|
"dev": "next dev --turbo",
|
|
1222
1223
|
"build": "next build",
|
|
1223
1224
|
"start": "next start",
|
|
1224
|
-
"lint": "
|
|
1225
|
+
"lint": "eslint ."
|
|
1225
1226
|
},
|
|
1226
1227
|
"dependencies": {
|
|
1227
|
-
"@ai-sdk/openai": "^2.0.
|
|
1228
|
+
"@ai-sdk/openai": "^2.0.42",
|
|
1228
1229
|
"@assistant-ui/react": "workspace:*",
|
|
1229
1230
|
"@assistant-ui/react-ai-sdk": "workspace:*",
|
|
1230
1231
|
"@assistant-ui/react-hook-form": "workspace:*",
|
|
1231
1232
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
1232
1233
|
"@ffmpeg/ffmpeg": "^0.12.15",
|
|
1233
1234
|
"@ffmpeg/util": "^0.12.2",
|
|
1234
|
-
"@hookform/resolvers": "^5.2.
|
|
1235
|
+
"@hookform/resolvers": "^5.2.2",
|
|
1235
1236
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
1236
1237
|
"@radix-ui/react-icons": "^1.3.2",
|
|
1237
1238
|
"@radix-ui/react-label": "^2.1.7",
|
|
@@ -1239,21 +1240,21 @@ export default nextConfig;
|
|
|
1239
1240
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
1240
1241
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
1241
1242
|
"@react-hook/media-query": "^1.1.1",
|
|
1242
|
-
"ai": "^5.0.
|
|
1243
|
+
"ai": "^5.0.59",
|
|
1243
1244
|
"class-variance-authority": "^0.7.1",
|
|
1244
1245
|
"clsx": "^2.1.1",
|
|
1245
1246
|
"json-schema-to-zod": "^2.6.1",
|
|
1246
|
-
"lucide-react": "^0.
|
|
1247
|
-
"next": "15.4
|
|
1248
|
-
"react": "19.
|
|
1249
|
-
"react-dom": "19.
|
|
1250
|
-
"react-hook-form": "^7.
|
|
1251
|
-
"react-resizable-panels": "^3.0.
|
|
1247
|
+
"lucide-react": "^0.544.0",
|
|
1248
|
+
"next": "15.5.4",
|
|
1249
|
+
"react": "19.2.0",
|
|
1250
|
+
"react-dom": "19.2.0",
|
|
1251
|
+
"react-hook-form": "^7.63.0",
|
|
1252
|
+
"react-resizable-panels": "^3.0.6",
|
|
1252
1253
|
"remark-gfm": "^4.0.1",
|
|
1253
1254
|
"tailwind-merge": "^3.3.1",
|
|
1254
|
-
"tw-animate-css": "^1.
|
|
1255
|
-
"zod": "^4.
|
|
1256
|
-
"zustand": "^5.0.
|
|
1255
|
+
"tw-animate-css": "^1.4.0",
|
|
1256
|
+
"zod": "^4.1.11",
|
|
1257
|
+
"zustand": "^5.0.8"
|
|
1257
1258
|
},
|
|
1258
1259
|
"devDependencies": {
|
|
1259
1260
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
@@ -1261,10 +1262,10 @@ export default nextConfig;
|
|
|
1261
1262
|
"@types/react": "^19",
|
|
1262
1263
|
"@types/react-dom": "^19",
|
|
1263
1264
|
"eslint": "^9",
|
|
1264
|
-
"eslint-config-next": "15.4
|
|
1265
|
+
"eslint-config-next": "15.5.4",
|
|
1265
1266
|
"postcss": "^8",
|
|
1266
|
-
"tailwindcss": "^4.1.
|
|
1267
|
-
"typescript": "^5.9.
|
|
1267
|
+
"tailwindcss": "^4.1.14",
|
|
1268
|
+
"typescript": "^5.9.3"
|
|
1268
1269
|
}
|
|
1269
1270
|
}
|
|
1270
1271
|
|
|
@@ -77,68 +77,6 @@ export const OPTIONS = () => {
|
|
|
77
77
|
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
## app/api/assistant-ui-token/route.ts
|
|
81
|
-
|
|
82
|
-
```typescript
|
|
83
|
-
import { customAlphabet } from "nanoid";
|
|
84
|
-
import { cookies } from "next/headers";
|
|
85
|
-
import jwt, { JwtPayload } from "jsonwebtoken";
|
|
86
|
-
import { AssistantCloud } from "@assistant-ui/react";
|
|
87
|
-
|
|
88
|
-
const generateId = customAlphabet(
|
|
89
|
-
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
90
|
-
32,
|
|
91
|
-
);
|
|
92
|
-
const randomUserId = () => {
|
|
93
|
-
const userId = "usr_anon_" + generateId();
|
|
94
|
-
return userId;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
const getJwtForUser = (userId: string) => {
|
|
98
|
-
return jwt.sign(
|
|
99
|
-
{
|
|
100
|
-
sub: userId,
|
|
101
|
-
iat: Math.floor(Date.now() / 1000),
|
|
102
|
-
exp: Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 7, // 1 week
|
|
103
|
-
},
|
|
104
|
-
process.env["JWT_SECRET"]!,
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const getUserIdFromJwt = (token: string) => {
|
|
109
|
-
const decoded = jwt.verify(token, process.env["JWT_SECRET"]!) as JwtPayload;
|
|
110
|
-
return decoded.sub!;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export const POST = async () => {
|
|
114
|
-
const cookieStore = await cookies();
|
|
115
|
-
const jwtCookie = cookieStore.get("jwt");
|
|
116
|
-
let userId;
|
|
117
|
-
if (!jwtCookie) {
|
|
118
|
-
userId = randomUserId();
|
|
119
|
-
} else {
|
|
120
|
-
userId = getUserIdFromJwt(jwtCookie.value);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
cookieStore.set("jwt", getJwtForUser(userId), {
|
|
124
|
-
path: "/",
|
|
125
|
-
httpOnly: true,
|
|
126
|
-
secure: process.env.NODE_ENV === "production",
|
|
127
|
-
sameSite: "strict",
|
|
128
|
-
maxAge: 60 * 60 * 24 * 7, // 1 week
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
const client = new AssistantCloud({
|
|
132
|
-
apiKey: process.env["ASSISTANT_API_KEY"]!,
|
|
133
|
-
userId,
|
|
134
|
-
workspaceId: userId,
|
|
135
|
-
});
|
|
136
|
-
const { token } = await client.auth.tokens.create();
|
|
137
|
-
return Response.json({ token });
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
|
|
142
80
|
## app/globals.css
|
|
143
81
|
|
|
144
82
|
```css
|
|
@@ -302,21 +240,19 @@ export default function RootLayout({
|
|
|
302
240
|
```tsx
|
|
303
241
|
"use client";
|
|
304
242
|
|
|
305
|
-
import {
|
|
306
|
-
AssistantCloud,
|
|
307
|
-
AssistantRuntimeProvider,
|
|
308
|
-
useCloudThreadListRuntime,
|
|
309
|
-
useThreadListItemRuntime,
|
|
310
|
-
} from "@assistant-ui/react";
|
|
243
|
+
import { AssistantRuntimeProvider } from "@assistant-ui/react";
|
|
311
244
|
import { useLangGraphRuntime } from "@assistant-ui/react-langgraph";
|
|
312
245
|
import { createThread, getThreadState, sendMessage } from "@/lib/chatApi";
|
|
313
246
|
import { LangChainMessage } from "@assistant-ui/react-langgraph";
|
|
314
247
|
|
|
315
|
-
|
|
316
|
-
|
|
248
|
+
export function MyRuntimeProvider({
|
|
249
|
+
children,
|
|
250
|
+
}: Readonly<{
|
|
251
|
+
children: React.ReactNode;
|
|
252
|
+
}>) {
|
|
317
253
|
const runtime = useLangGraphRuntime({
|
|
318
|
-
stream: async function* (messages) {
|
|
319
|
-
const { externalId } = await
|
|
254
|
+
stream: async function* (messages, { initialize }) {
|
|
255
|
+
const { externalId } = await initialize();
|
|
320
256
|
if (!externalId) throw new Error("Thread not found");
|
|
321
257
|
|
|
322
258
|
const generator = sendMessage({
|
|
@@ -326,7 +262,11 @@ const useMyLangGraphRuntime = () => {
|
|
|
326
262
|
|
|
327
263
|
yield* generator;
|
|
328
264
|
},
|
|
329
|
-
|
|
265
|
+
create: async () => {
|
|
266
|
+
const { thread_id } = await createThread();
|
|
267
|
+
return { externalId: thread_id };
|
|
268
|
+
},
|
|
269
|
+
load: async (externalId) => {
|
|
330
270
|
const state = await getThreadState(externalId);
|
|
331
271
|
return {
|
|
332
272
|
messages:
|
|
@@ -336,31 +276,6 @@ const useMyLangGraphRuntime = () => {
|
|
|
336
276
|
},
|
|
337
277
|
});
|
|
338
278
|
|
|
339
|
-
return runtime;
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
const cloud = new AssistantCloud({
|
|
343
|
-
baseUrl: process.env["NEXT_PUBLIC_ASSISTANT_BASE_URL"]!,
|
|
344
|
-
authToken: () =>
|
|
345
|
-
fetch("/api/assistant-ui-token", { method: "POST" })
|
|
346
|
-
.then((r) => r.json())
|
|
347
|
-
.then((r) => r.token),
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
export function MyRuntimeProvider({
|
|
351
|
-
children,
|
|
352
|
-
}: Readonly<{
|
|
353
|
-
children: React.ReactNode;
|
|
354
|
-
}>) {
|
|
355
|
-
const runtime = useCloudThreadListRuntime({
|
|
356
|
-
cloud,
|
|
357
|
-
runtimeHook: useMyLangGraphRuntime,
|
|
358
|
-
create: async () => {
|
|
359
|
-
const { thread_id } = await createThread();
|
|
360
|
-
return { externalId: thread_id };
|
|
361
|
-
},
|
|
362
|
-
});
|
|
363
|
-
|
|
364
279
|
return (
|
|
365
280
|
<AssistantRuntimeProvider runtime={runtime}>
|
|
366
281
|
{children}
|
|
@@ -1716,6 +1631,7 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
1716
1631
|
```typescript
|
|
1717
1632
|
/// <reference types="next" />
|
|
1718
1633
|
/// <reference types="next/image-types/global" />
|
|
1634
|
+
/// <reference path="./.next/types/routes.d.ts" />
|
|
1719
1635
|
|
|
1720
1636
|
// NOTE: This file should not be edited
|
|
1721
1637
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
|
@@ -1728,7 +1644,14 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
1728
1644
|
import type { NextConfig } from "next";
|
|
1729
1645
|
|
|
1730
1646
|
const nextConfig: NextConfig = {
|
|
1731
|
-
|
|
1647
|
+
async rewrites() {
|
|
1648
|
+
return [
|
|
1649
|
+
{
|
|
1650
|
+
source: "/assistant/:path*",
|
|
1651
|
+
destination: "http://localhost:8000/assistant/:path*",
|
|
1652
|
+
},
|
|
1653
|
+
];
|
|
1654
|
+
},
|
|
1732
1655
|
};
|
|
1733
1656
|
|
|
1734
1657
|
export default nextConfig;
|
|
@@ -1746,27 +1669,27 @@ export default nextConfig;
|
|
|
1746
1669
|
"dev": "next dev --turbo",
|
|
1747
1670
|
"build": "next build",
|
|
1748
1671
|
"start": "next start",
|
|
1749
|
-
"lint": "
|
|
1672
|
+
"lint": "eslint ."
|
|
1750
1673
|
},
|
|
1751
1674
|
"dependencies": {
|
|
1752
1675
|
"@assistant-ui/react": "workspace:*",
|
|
1753
1676
|
"@assistant-ui/react-langgraph": "workspace:*",
|
|
1754
1677
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
1755
|
-
"@langchain/langgraph-sdk": "^0.
|
|
1678
|
+
"@langchain/langgraph-sdk": "^0.1.9",
|
|
1756
1679
|
"@radix-ui/react-slot": "^1.2.3",
|
|
1757
1680
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
1758
1681
|
"class-variance-authority": "^0.7.1",
|
|
1759
1682
|
"clsx": "^2.1.1",
|
|
1760
1683
|
"js-cookie": "^3.0.5",
|
|
1761
1684
|
"jsonwebtoken": "^9.0.2",
|
|
1762
|
-
"lucide-react": "^0.
|
|
1763
|
-
"nanoid": "5.1.
|
|
1764
|
-
"next": "15.4
|
|
1765
|
-
"react": "19.
|
|
1766
|
-
"react-dom": "19.
|
|
1685
|
+
"lucide-react": "^0.544.0",
|
|
1686
|
+
"nanoid": "5.1.6",
|
|
1687
|
+
"next": "15.5.4",
|
|
1688
|
+
"react": "19.2.0",
|
|
1689
|
+
"react-dom": "19.2.0",
|
|
1767
1690
|
"remark-gfm": "^4.0.1",
|
|
1768
1691
|
"tailwind-merge": "^3.3.1",
|
|
1769
|
-
"tw-animate-css": "^1.
|
|
1692
|
+
"tw-animate-css": "^1.4.0"
|
|
1770
1693
|
},
|
|
1771
1694
|
"devDependencies": {
|
|
1772
1695
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
@@ -1776,10 +1699,10 @@ export default nextConfig;
|
|
|
1776
1699
|
"@types/react": "^19",
|
|
1777
1700
|
"@types/react-dom": "^19",
|
|
1778
1701
|
"eslint": "^9",
|
|
1779
|
-
"eslint-config-next": "15.4
|
|
1702
|
+
"eslint-config-next": "15.5.4",
|
|
1780
1703
|
"postcss": "^8",
|
|
1781
|
-
"tailwindcss": "^4.1.
|
|
1782
|
-
"typescript": "^5.9.
|
|
1704
|
+
"tailwindcss": "^4.1.14",
|
|
1705
|
+
"typescript": "^5.9.3"
|
|
1783
1706
|
}
|
|
1784
1707
|
}
|
|
1785
1708
|
|
|
@@ -1245,23 +1245,23 @@ export default nextConfig;
|
|
|
1245
1245
|
"dev": "next dev --turbo",
|
|
1246
1246
|
"build": "next build",
|
|
1247
1247
|
"start": "next start",
|
|
1248
|
-
"lint": "
|
|
1248
|
+
"lint": "eslint ."
|
|
1249
1249
|
},
|
|
1250
1250
|
"dependencies": {
|
|
1251
|
-
"@ai-sdk/openai": "^2.0.
|
|
1251
|
+
"@ai-sdk/openai": "^2.0.42",
|
|
1252
1252
|
"@assistant-ui/react": "workspace:*",
|
|
1253
1253
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
1254
1254
|
"@radix-ui/react-slot": "^1.2.3",
|
|
1255
1255
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
1256
1256
|
"class-variance-authority": "^0.7.1",
|
|
1257
1257
|
"clsx": "^2.1.1",
|
|
1258
|
-
"lucide-react": "^0.
|
|
1259
|
-
"next": "15.4
|
|
1260
|
-
"react": "19.
|
|
1261
|
-
"react-dom": "19.
|
|
1258
|
+
"lucide-react": "^0.544.0",
|
|
1259
|
+
"next": "15.5.4",
|
|
1260
|
+
"react": "19.2.0",
|
|
1261
|
+
"react-dom": "19.2.0",
|
|
1262
1262
|
"remark-gfm": "^4.0.1",
|
|
1263
1263
|
"tailwind-merge": "^3.3.1",
|
|
1264
|
-
"tw-animate-css": "^1.
|
|
1264
|
+
"tw-animate-css": "^1.4.0"
|
|
1265
1265
|
},
|
|
1266
1266
|
"devDependencies": {
|
|
1267
1267
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
@@ -1269,9 +1269,9 @@ export default nextConfig;
|
|
|
1269
1269
|
"@types/react": "^19",
|
|
1270
1270
|
"@types/react-dom": "^19",
|
|
1271
1271
|
"eslint": "^9",
|
|
1272
|
-
"eslint-config-next": "15.4
|
|
1272
|
+
"eslint-config-next": "15.5.4",
|
|
1273
1273
|
"postcss": "^8",
|
|
1274
|
-
"tailwindcss": "^4.1.
|
|
1274
|
+
"tailwindcss": "^4.1.14",
|
|
1275
1275
|
"typescript": "^5"
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|
|
@@ -1613,6 +1613,7 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
1613
1613
|
```typescript
|
|
1614
1614
|
/// <reference types="next" />
|
|
1615
1615
|
/// <reference types="next/image-types/global" />
|
|
1616
|
+
/// <reference path="./.next/types/routes.d.ts" />
|
|
1616
1617
|
|
|
1617
1618
|
// NOTE: This file should not be edited
|
|
1618
1619
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
|
@@ -1643,15 +1644,15 @@ export default nextConfig;
|
|
|
1643
1644
|
"dev": "next dev --turbo",
|
|
1644
1645
|
"build": "next build",
|
|
1645
1646
|
"start": "next start",
|
|
1646
|
-
"lint": "
|
|
1647
|
+
"lint": "eslint ."
|
|
1647
1648
|
},
|
|
1648
1649
|
"dependencies": {
|
|
1649
|
-
"@ai-sdk/openai": "^2.0.
|
|
1650
|
+
"@ai-sdk/openai": "^2.0.42",
|
|
1650
1651
|
"@assistant-ui/react": "workspace:*",
|
|
1651
1652
|
"@assistant-ui/react-ai-sdk": "workspace:*",
|
|
1652
1653
|
"@assistant-ui/react-hook-form": "workspace:*",
|
|
1653
1654
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
1654
|
-
"@hookform/resolvers": "^5.2.
|
|
1655
|
+
"@hookform/resolvers": "^5.2.2",
|
|
1655
1656
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
1656
1657
|
"@radix-ui/react-icons": "^1.3.2",
|
|
1657
1658
|
"@radix-ui/react-label": "^2.1.7",
|
|
@@ -1659,21 +1660,21 @@ export default nextConfig;
|
|
|
1659
1660
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
1660
1661
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
1661
1662
|
"@react-hook/media-query": "^1.1.1",
|
|
1662
|
-
"ai": "^5.0.
|
|
1663
|
+
"ai": "^5.0.59",
|
|
1663
1664
|
"class-variance-authority": "^0.7.1",
|
|
1664
1665
|
"clsx": "^2.1.1",
|
|
1665
1666
|
"json-schema-to-zod": "^2.6.1",
|
|
1666
|
-
"lucide-react": "^0.
|
|
1667
|
-
"next": "15.4
|
|
1668
|
-
"react": "19.
|
|
1669
|
-
"react-dom": "19.
|
|
1670
|
-
"react-hook-form": "^7.
|
|
1671
|
-
"react-resizable-panels": "^3.0.
|
|
1667
|
+
"lucide-react": "^0.544.0",
|
|
1668
|
+
"next": "15.5.4",
|
|
1669
|
+
"react": "19.2.0",
|
|
1670
|
+
"react-dom": "19.2.0",
|
|
1671
|
+
"react-hook-form": "^7.63.0",
|
|
1672
|
+
"react-resizable-panels": "^3.0.6",
|
|
1672
1673
|
"remark-gfm": "^4.0.1",
|
|
1673
1674
|
"tailwind-merge": "^3.3.1",
|
|
1674
|
-
"tw-animate-css": "^1.
|
|
1675
|
-
"zod": "^4.
|
|
1676
|
-
"zustand": "^5.0.
|
|
1675
|
+
"tw-animate-css": "^1.4.0",
|
|
1676
|
+
"zod": "^4.1.11",
|
|
1677
|
+
"zustand": "^5.0.8"
|
|
1677
1678
|
},
|
|
1678
1679
|
"devDependencies": {
|
|
1679
1680
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
@@ -1681,10 +1682,10 @@ export default nextConfig;
|
|
|
1681
1682
|
"@types/react": "^19",
|
|
1682
1683
|
"@types/react-dom": "^19",
|
|
1683
1684
|
"eslint": "^9",
|
|
1684
|
-
"eslint-config-next": "15.4
|
|
1685
|
+
"eslint-config-next": "15.5.4",
|
|
1685
1686
|
"postcss": "^8",
|
|
1686
|
-
"tailwindcss": "^4.1.
|
|
1687
|
-
"typescript": "^5.9.
|
|
1687
|
+
"tailwindcss": "^4.1.14",
|
|
1688
|
+
"typescript": "^5.9.3"
|
|
1688
1689
|
}
|
|
1689
1690
|
}
|
|
1690
1691
|
|
|
@@ -195,8 +195,7 @@ const Suggestion = () => {
|
|
|
195
195
|
return (
|
|
196
196
|
<ThreadPrimitive.Suggestion
|
|
197
197
|
prompt="I need help with product search"
|
|
198
|
-
|
|
199
|
-
autoSend
|
|
198
|
+
send
|
|
200
199
|
/>
|
|
201
200
|
);
|
|
202
201
|
};
|
|
@@ -211,17 +210,29 @@ const Suggestion = () => {
|
|
|
211
210
|
description: "The suggestion's prompt.",
|
|
212
211
|
},
|
|
213
212
|
{
|
|
214
|
-
name: "
|
|
215
|
-
type: "
|
|
213
|
+
name: "send",
|
|
214
|
+
type: "boolean",
|
|
216
215
|
description:
|
|
217
|
-
"
|
|
216
|
+
"When true, automatically sends the message. When false, replaces or appends the composer text with the suggestion - depending on the value of `clearComposer`",
|
|
218
217
|
},
|
|
219
218
|
{
|
|
220
|
-
name: "
|
|
219
|
+
name: "clearComposer",
|
|
221
220
|
type: "boolean",
|
|
221
|
+
default: "true",
|
|
222
222
|
description:
|
|
223
|
-
"Whether to
|
|
224
|
-
|
|
223
|
+
"Whether to clear the composer after sending. When send is set to false, determines if composer text is replaced with suggestion (true, default), or if the suggestion's prompt is appended to the composer text (false).",
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: "autoSend",
|
|
227
|
+
type: "boolean",
|
|
228
|
+
deprecated: true,
|
|
229
|
+
description: "Deprecated. Use 'send' instead.",
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "method",
|
|
233
|
+
type: "'replace'",
|
|
234
|
+
deprecated: true,
|
|
235
|
+
description: "Deprecated. This parameter is no longer used.",
|
|
225
236
|
},
|
|
226
237
|
]}
|
|
227
238
|
/>
|
|
@@ -243,6 +254,21 @@ Renders children if a condition is met.
|
|
|
243
254
|
type: "boolean | undefined",
|
|
244
255
|
description: "Render children if the thread is running.",
|
|
245
256
|
},
|
|
257
|
+
{
|
|
258
|
+
name: "disabled",
|
|
259
|
+
type: "boolean | undefined",
|
|
260
|
+
description: "Render children if the thread is disabled.",
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "loading",
|
|
264
|
+
type: "boolean | undefined",
|
|
265
|
+
description: "Render children if the thread is loading.",
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
name: "new",
|
|
269
|
+
type: "boolean | undefined",
|
|
270
|
+
description: "Render children if the thread is new.",
|
|
271
|
+
},
|
|
246
272
|
]}
|
|
247
273
|
/>
|
|
248
274
|
|
|
@@ -253,4 +279,10 @@ Renders children if a condition is met.
|
|
|
253
279
|
<Thread.If empty={false}>
|
|
254
280
|
{/* rendered if thread is not empty */}
|
|
255
281
|
</Thread.If>
|
|
282
|
+
<Thread.If loading>
|
|
283
|
+
{/* rendered if thread is loading */}
|
|
284
|
+
</Thread.If>
|
|
285
|
+
<Thread.If new>
|
|
286
|
+
{/* rendered if thread is new */}
|
|
287
|
+
</Thread.If>
|
|
256
288
|
```
|