@assistant-ui/mcp-docs-server 0.1.9 → 0.1.11
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 +26 -26
- package/.docs/organized/code-examples/with-assistant-transport.md +29 -29
- package/.docs/organized/code-examples/with-cloud.md +21 -21
- package/.docs/organized/code-examples/with-external-store.md +18 -18
- package/.docs/organized/code-examples/with-ffmpeg.md +22 -22
- package/.docs/organized/code-examples/with-langgraph.md +35 -120
- package/.docs/organized/code-examples/with-parent-id-grouping.md +18 -18
- package/.docs/organized/code-examples/with-react-hook-form.md +27 -27
- package/.docs/raw/docs/api-reference/primitives/Thread.mdx +40 -8
- package/.docs/raw/docs/cloud/persistence/langgraph.mdx +64 -68
- package/.docs/raw/docs/getting-started.mdx +541 -152
- package/.docs/raw/docs/guides/Attachments.mdx +21 -0
- 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/custom-thread-list.mdx +218 -0
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +31 -24
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +55 -20
- package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +8 -3
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +1 -1
- package/.docs/raw/docs/ui/AssistantModal.mdx +21 -0
- package/.docs/raw/docs/ui/AssistantSidebar.mdx +21 -0
- package/.docs/raw/docs/ui/Attachment.mdx +21 -0
- package/.docs/raw/docs/ui/Markdown.mdx +22 -1
- package/.docs/raw/docs/ui/Mermaid.mdx +22 -1
- package/.docs/raw/docs/ui/SyntaxHighlighting.mdx +43 -2
- package/.docs/raw/docs/ui/Thread.mdx +374 -5
- package/.docs/raw/docs/ui/ThreadList.mdx +48 -2
- package/.docs/raw/docs/ui/ToolFallback.mdx +21 -0
- package/package.json +7 -7
- 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
|
@@ -552,7 +552,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
552
552
|
h2: ({ className, ...props }) => (
|
|
553
553
|
<h2
|
|
554
554
|
className={cn(
|
|
555
|
-
"mb-4
|
|
555
|
+
"mt-8 mb-4 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",
|
|
556
556
|
className,
|
|
557
557
|
)}
|
|
558
558
|
{...props}
|
|
@@ -561,7 +561,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
561
561
|
h3: ({ className, ...props }) => (
|
|
562
562
|
<h3
|
|
563
563
|
className={cn(
|
|
564
|
-
"mb-4
|
|
564
|
+
"mt-6 mb-4 scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",
|
|
565
565
|
className,
|
|
566
566
|
)}
|
|
567
567
|
{...props}
|
|
@@ -570,7 +570,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
570
570
|
h4: ({ className, ...props }) => (
|
|
571
571
|
<h4
|
|
572
572
|
className={cn(
|
|
573
|
-
"mb-4
|
|
573
|
+
"mt-6 mb-4 scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",
|
|
574
574
|
className,
|
|
575
575
|
)}
|
|
576
576
|
{...props}
|
|
@@ -593,7 +593,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
593
593
|
),
|
|
594
594
|
p: ({ className, ...props }) => (
|
|
595
595
|
<p
|
|
596
|
-
className={cn("
|
|
596
|
+
className={cn("mt-5 mb-5 leading-7 first:mt-0 last:mb-0", className)}
|
|
597
597
|
{...props}
|
|
598
598
|
/>
|
|
599
599
|
),
|
|
@@ -790,7 +790,7 @@ const ThreadWelcomeSuggestions: FC = () => {
|
|
|
790
790
|
method="replace"
|
|
791
791
|
autoSend
|
|
792
792
|
>
|
|
793
|
-
<span className="line-clamp-2 text-
|
|
793
|
+
<span className="line-clamp-2 text-sm font-semibold text-ellipsis">
|
|
794
794
|
What is the weather in Tokyo?
|
|
795
795
|
</span>
|
|
796
796
|
</ThreadPrimitive.Suggestion>
|
|
@@ -800,7 +800,7 @@ const ThreadWelcomeSuggestions: FC = () => {
|
|
|
800
800
|
method="replace"
|
|
801
801
|
autoSend
|
|
802
802
|
>
|
|
803
|
-
<span className="line-clamp-2 text-
|
|
803
|
+
<span className="line-clamp-2 text-sm font-semibold text-ellipsis">
|
|
804
804
|
What is assistant-ui?
|
|
805
805
|
</span>
|
|
806
806
|
</ThreadPrimitive.Suggestion>
|
|
@@ -856,7 +856,7 @@ const UserMessage: FC = () => {
|
|
|
856
856
|
<MessagePrimitive.Root className="grid w-full max-w-[var(--thread-max-width)] auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] gap-y-2 py-4 [&:where(>*)]:col-start-2">
|
|
857
857
|
<UserActionBar />
|
|
858
858
|
|
|
859
|
-
<div className="bg-muted text-foreground col-start-2 row-start-2 max-w-[calc(var(--thread-max-width)*0.8)]
|
|
859
|
+
<div className="bg-muted text-foreground col-start-2 row-start-2 max-w-[calc(var(--thread-max-width)*0.8)] rounded-3xl px-5 py-2.5 break-words">
|
|
860
860
|
<MessagePrimitive.Parts />
|
|
861
861
|
</div>
|
|
862
862
|
|
|
@@ -870,7 +870,7 @@ const UserActionBar: FC = () => {
|
|
|
870
870
|
<ActionBarPrimitive.Root
|
|
871
871
|
hideWhenRunning
|
|
872
872
|
autohide="not-last"
|
|
873
|
-
className="col-start-1 row-start-2
|
|
873
|
+
className="col-start-1 row-start-2 mt-2.5 mr-3 flex flex-col items-end"
|
|
874
874
|
>
|
|
875
875
|
<ActionBarPrimitive.Edit asChild>
|
|
876
876
|
<TooltipIconButton tooltip="Edit">
|
|
@@ -901,13 +901,13 @@ const EditComposer: FC = () => {
|
|
|
901
901
|
const AssistantMessage: FC = () => {
|
|
902
902
|
return (
|
|
903
903
|
<MessagePrimitive.Root className="relative grid w-full max-w-[var(--thread-max-width)] grid-cols-[auto_auto_1fr] grid-rows-[auto_1fr] py-4">
|
|
904
|
-
<div className="text-foreground col-span-2 col-start-2 row-start-1 my-1.5 max-w-[calc(var(--thread-max-width)*0.8)] break-words
|
|
904
|
+
<div className="text-foreground col-span-2 col-start-2 row-start-1 my-1.5 max-w-[calc(var(--thread-max-width)*0.8)] leading-7 break-words">
|
|
905
905
|
<MessagePrimitive.Parts components={{ Text: MarkdownText }} />
|
|
906
906
|
</div>
|
|
907
907
|
|
|
908
908
|
<AssistantActionBar />
|
|
909
909
|
|
|
910
|
-
<BranchPicker className="col-start-2 row-start-2 -
|
|
910
|
+
<BranchPicker className="col-start-2 row-start-2 mr-2 -ml-2" />
|
|
911
911
|
</MessagePrimitive.Root>
|
|
912
912
|
);
|
|
913
913
|
};
|
|
@@ -1151,7 +1151,7 @@ function TooltipContent({
|
|
|
1151
1151
|
data-slot="tooltip-content"
|
|
1152
1152
|
sideOffset={sideOffset}
|
|
1153
1153
|
className={cn(
|
|
1154
|
-
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-[--radix-tooltip-content-transform-origin]
|
|
1154
|
+
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-[--radix-tooltip-content-transform-origin] rounded-md px-3 py-1.5 text-xs text-balance",
|
|
1155
1155
|
className,
|
|
1156
1156
|
)}
|
|
1157
1157
|
{...props}
|
|
@@ -1225,7 +1225,7 @@ export default nextConfig;
|
|
|
1225
1225
|
"lint": "eslint ."
|
|
1226
1226
|
},
|
|
1227
1227
|
"dependencies": {
|
|
1228
|
-
"@ai-sdk/openai": "^2.0.
|
|
1228
|
+
"@ai-sdk/openai": "^2.0.52",
|
|
1229
1229
|
"@assistant-ui/react": "workspace:*",
|
|
1230
1230
|
"@assistant-ui/react-ai-sdk": "workspace:*",
|
|
1231
1231
|
"@assistant-ui/react-hook-form": "workspace:*",
|
|
@@ -1240,20 +1240,20 @@ export default nextConfig;
|
|
|
1240
1240
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
1241
1241
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
1242
1242
|
"@react-hook/media-query": "^1.1.1",
|
|
1243
|
-
"ai": "^5.0.
|
|
1243
|
+
"ai": "^5.0.76",
|
|
1244
1244
|
"class-variance-authority": "^0.7.1",
|
|
1245
1245
|
"clsx": "^2.1.1",
|
|
1246
1246
|
"json-schema-to-zod": "^2.6.1",
|
|
1247
|
-
"lucide-react": "^0.
|
|
1248
|
-
"next": "15.5.
|
|
1249
|
-
"react": "19.
|
|
1250
|
-
"react-dom": "19.
|
|
1251
|
-
"react-hook-form": "^7.
|
|
1247
|
+
"lucide-react": "^0.546.0",
|
|
1248
|
+
"next": "15.5.6",
|
|
1249
|
+
"react": "19.2.0",
|
|
1250
|
+
"react-dom": "19.2.0",
|
|
1251
|
+
"react-hook-form": "^7.65.0",
|
|
1252
1252
|
"react-resizable-panels": "^3.0.6",
|
|
1253
1253
|
"remark-gfm": "^4.0.1",
|
|
1254
1254
|
"tailwind-merge": "^3.3.1",
|
|
1255
1255
|
"tw-animate-css": "^1.4.0",
|
|
1256
|
-
"zod": "^4.1.
|
|
1256
|
+
"zod": "^4.1.12",
|
|
1257
1257
|
"zustand": "^5.0.8"
|
|
1258
1258
|
},
|
|
1259
1259
|
"devDependencies": {
|
|
@@ -1262,10 +1262,10 @@ export default nextConfig;
|
|
|
1262
1262
|
"@types/react": "^19",
|
|
1263
1263
|
"@types/react-dom": "^19",
|
|
1264
1264
|
"eslint": "^9",
|
|
1265
|
-
"eslint-config-next": "15.5.
|
|
1265
|
+
"eslint-config-next": "15.5.6",
|
|
1266
1266
|
"postcss": "^8",
|
|
1267
|
-
"tailwindcss": "^4.1.
|
|
1268
|
-
"typescript": "^5.9.
|
|
1267
|
+
"tailwindcss": "^4.1.14",
|
|
1268
|
+
"typescript": "^5.9.3"
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
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}
|
|
@@ -502,7 +417,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
502
417
|
h2: ({ className, ...props }) => (
|
|
503
418
|
<h2
|
|
504
419
|
className={cn(
|
|
505
|
-
"mb-4
|
|
420
|
+
"mt-8 mb-4 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",
|
|
506
421
|
className,
|
|
507
422
|
)}
|
|
508
423
|
{...props}
|
|
@@ -511,7 +426,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
511
426
|
h3: ({ className, ...props }) => (
|
|
512
427
|
<h3
|
|
513
428
|
className={cn(
|
|
514
|
-
"mb-4
|
|
429
|
+
"mt-6 mb-4 scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",
|
|
515
430
|
className,
|
|
516
431
|
)}
|
|
517
432
|
{...props}
|
|
@@ -520,7 +435,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
520
435
|
h4: ({ className, ...props }) => (
|
|
521
436
|
<h4
|
|
522
437
|
className={cn(
|
|
523
|
-
"mb-4
|
|
438
|
+
"mt-6 mb-4 scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",
|
|
524
439
|
className,
|
|
525
440
|
)}
|
|
526
441
|
{...props}
|
|
@@ -543,7 +458,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
543
458
|
),
|
|
544
459
|
p: ({ className, ...props }) => (
|
|
545
460
|
<p
|
|
546
|
-
className={cn("
|
|
461
|
+
className={cn("mt-5 mb-5 leading-7 first:mt-0 last:mb-0", className)}
|
|
547
462
|
{...props}
|
|
548
463
|
/>
|
|
549
464
|
),
|
|
@@ -687,7 +602,7 @@ const ThreadListItems: FC = () => {
|
|
|
687
602
|
|
|
688
603
|
const ThreadListItem: FC = () => {
|
|
689
604
|
return (
|
|
690
|
-
<ThreadListItemPrimitive.Root className="data-[active]:bg-muted hover:bg-muted focus-visible:bg-muted focus-visible:ring-ring flex items-center gap-2 rounded-lg transition-all focus-visible:
|
|
605
|
+
<ThreadListItemPrimitive.Root className="data-[active]:bg-muted hover:bg-muted focus-visible:bg-muted focus-visible:ring-ring flex items-center gap-2 rounded-lg transition-all focus-visible:ring-2 focus-visible:outline-none">
|
|
691
606
|
<ThreadListItemPrimitive.Trigger className="flex-grow px-3 py-2 text-start">
|
|
692
607
|
<ThreadListItemTitle />
|
|
693
608
|
</ThreadListItemPrimitive.Trigger>
|
|
@@ -708,7 +623,7 @@ const ThreadListItemArchive: FC = () => {
|
|
|
708
623
|
return (
|
|
709
624
|
<ThreadListItemPrimitive.Archive asChild>
|
|
710
625
|
<TooltipIconButton
|
|
711
|
-
className="hover:text-primary text-foreground ml-auto
|
|
626
|
+
className="hover:text-primary text-foreground mr-3 ml-auto size-4 p-0"
|
|
712
627
|
variant="ghost"
|
|
713
628
|
tooltip="Archive thread"
|
|
714
629
|
>
|
|
@@ -815,7 +730,7 @@ const ThreadWelcomeSuggestions: FC = () => {
|
|
|
815
730
|
method="replace"
|
|
816
731
|
autoSend
|
|
817
732
|
>
|
|
818
|
-
<span className="line-clamp-2 text-
|
|
733
|
+
<span className="line-clamp-2 text-sm font-semibold text-ellipsis">
|
|
819
734
|
What is the weather in Tokyo?
|
|
820
735
|
</span>
|
|
821
736
|
</ThreadPrimitive.Suggestion>
|
|
@@ -825,7 +740,7 @@ const ThreadWelcomeSuggestions: FC = () => {
|
|
|
825
740
|
method="replace"
|
|
826
741
|
autoSend
|
|
827
742
|
>
|
|
828
|
-
<span className="line-clamp-2 text-
|
|
743
|
+
<span className="line-clamp-2 text-sm font-semibold text-ellipsis">
|
|
829
744
|
What is assistant-ui?
|
|
830
745
|
</span>
|
|
831
746
|
</ThreadPrimitive.Suggestion>
|
|
@@ -881,7 +796,7 @@ const UserMessage: FC = () => {
|
|
|
881
796
|
<MessagePrimitive.Root className="grid w-full max-w-[var(--thread-max-width)] auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] gap-y-2 py-4 [&:where(>*)]:col-start-2">
|
|
882
797
|
<UserActionBar />
|
|
883
798
|
|
|
884
|
-
<div className="bg-muted text-foreground col-start-2 row-start-2 max-w-[calc(var(--thread-max-width)*0.8)]
|
|
799
|
+
<div className="bg-muted text-foreground col-start-2 row-start-2 max-w-[calc(var(--thread-max-width)*0.8)] rounded-3xl px-5 py-2.5 break-words">
|
|
885
800
|
<MessagePrimitive.Parts />
|
|
886
801
|
</div>
|
|
887
802
|
|
|
@@ -895,7 +810,7 @@ const UserActionBar: FC = () => {
|
|
|
895
810
|
<ActionBarPrimitive.Root
|
|
896
811
|
hideWhenRunning
|
|
897
812
|
autohide="not-last"
|
|
898
|
-
className="col-start-1 row-start-2
|
|
813
|
+
className="col-start-1 row-start-2 mt-2.5 mr-3 flex flex-col items-end"
|
|
899
814
|
>
|
|
900
815
|
<ActionBarPrimitive.Edit asChild>
|
|
901
816
|
<TooltipIconButton tooltip="Edit">
|
|
@@ -926,13 +841,13 @@ const EditComposer: FC = () => {
|
|
|
926
841
|
const AssistantMessage: FC = () => {
|
|
927
842
|
return (
|
|
928
843
|
<MessagePrimitive.Root className="relative grid w-full max-w-[var(--thread-max-width)] grid-cols-[auto_auto_1fr] grid-rows-[auto_1fr] py-4">
|
|
929
|
-
<div className="text-foreground col-span-2 col-start-2 row-start-1 my-1.5 max-w-[calc(var(--thread-max-width)*0.8)] break-words
|
|
844
|
+
<div className="text-foreground col-span-2 col-start-2 row-start-1 my-1.5 max-w-[calc(var(--thread-max-width)*0.8)] leading-7 break-words">
|
|
930
845
|
<MessagePrimitive.Parts components={{ Text: MarkdownText }} />
|
|
931
846
|
</div>
|
|
932
847
|
|
|
933
848
|
<AssistantActionBar />
|
|
934
849
|
|
|
935
|
-
<BranchPicker className="col-start-2 row-start-2 -
|
|
850
|
+
<BranchPicker className="col-start-2 row-start-2 mr-2 -ml-2" />
|
|
936
851
|
</MessagePrimitive.Root>
|
|
937
852
|
);
|
|
938
853
|
};
|
|
@@ -1499,7 +1414,7 @@ const CardTitle = React.forwardRef<
|
|
|
1499
1414
|
>(({ className, ...props }, ref) => (
|
|
1500
1415
|
<div
|
|
1501
1416
|
ref={ref}
|
|
1502
|
-
className={cn("font-semibold
|
|
1417
|
+
className={cn("leading-none font-semibold tracking-tight", className)}
|
|
1503
1418
|
{...props}
|
|
1504
1419
|
/>
|
|
1505
1420
|
));
|
|
@@ -1599,7 +1514,7 @@ function TooltipContent({
|
|
|
1599
1514
|
data-slot="tooltip-content"
|
|
1600
1515
|
sideOffset={sideOffset}
|
|
1601
1516
|
className={cn(
|
|
1602
|
-
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-tooltip-content-transform-origin)
|
|
1517
|
+
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
1603
1518
|
className,
|
|
1604
1519
|
)}
|
|
1605
1520
|
{...props}
|
|
@@ -1760,18 +1675,18 @@ export default nextConfig;
|
|
|
1760
1675
|
"@assistant-ui/react": "workspace:*",
|
|
1761
1676
|
"@assistant-ui/react-langgraph": "workspace:*",
|
|
1762
1677
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
1763
|
-
"@langchain/langgraph-sdk": "^0.
|
|
1678
|
+
"@langchain/langgraph-sdk": "^1.0.0",
|
|
1764
1679
|
"@radix-ui/react-slot": "^1.2.3",
|
|
1765
1680
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
1766
1681
|
"class-variance-authority": "^0.7.1",
|
|
1767
1682
|
"clsx": "^2.1.1",
|
|
1768
1683
|
"js-cookie": "^3.0.5",
|
|
1769
1684
|
"jsonwebtoken": "^9.0.2",
|
|
1770
|
-
"lucide-react": "^0.
|
|
1685
|
+
"lucide-react": "^0.546.0",
|
|
1771
1686
|
"nanoid": "5.1.6",
|
|
1772
|
-
"next": "15.5.
|
|
1773
|
-
"react": "19.
|
|
1774
|
-
"react-dom": "19.
|
|
1687
|
+
"next": "15.5.6",
|
|
1688
|
+
"react": "19.2.0",
|
|
1689
|
+
"react-dom": "19.2.0",
|
|
1775
1690
|
"remark-gfm": "^4.0.1",
|
|
1776
1691
|
"tailwind-merge": "^3.3.1",
|
|
1777
1692
|
"tw-animate-css": "^1.4.0"
|
|
@@ -1784,10 +1699,10 @@ export default nextConfig;
|
|
|
1784
1699
|
"@types/react": "^19",
|
|
1785
1700
|
"@types/react-dom": "^19",
|
|
1786
1701
|
"eslint": "^9",
|
|
1787
|
-
"eslint-config-next": "15.5.
|
|
1702
|
+
"eslint-config-next": "15.5.6",
|
|
1788
1703
|
"postcss": "^8",
|
|
1789
|
-
"tailwindcss": "^4.1.
|
|
1790
|
-
"typescript": "^5.9.
|
|
1704
|
+
"tailwindcss": "^4.1.14",
|
|
1705
|
+
"typescript": "^5.9.3"
|
|
1791
1706
|
}
|
|
1792
1707
|
}
|
|
1793
1708
|
|
|
@@ -503,7 +503,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
503
503
|
h2: ({ className, ...props }) => (
|
|
504
504
|
<h2
|
|
505
505
|
className={cn(
|
|
506
|
-
"mb-4
|
|
506
|
+
"mt-8 mb-4 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",
|
|
507
507
|
className,
|
|
508
508
|
)}
|
|
509
509
|
{...props}
|
|
@@ -512,7 +512,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
512
512
|
h3: ({ className, ...props }) => (
|
|
513
513
|
<h3
|
|
514
514
|
className={cn(
|
|
515
|
-
"mb-4
|
|
515
|
+
"mt-6 mb-4 scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",
|
|
516
516
|
className,
|
|
517
517
|
)}
|
|
518
518
|
{...props}
|
|
@@ -521,7 +521,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
521
521
|
h4: ({ className, ...props }) => (
|
|
522
522
|
<h4
|
|
523
523
|
className={cn(
|
|
524
|
-
"mb-4
|
|
524
|
+
"mt-6 mb-4 scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",
|
|
525
525
|
className,
|
|
526
526
|
)}
|
|
527
527
|
{...props}
|
|
@@ -544,7 +544,7 @@ const defaultComponents = memoizeMarkdownComponents({
|
|
|
544
544
|
),
|
|
545
545
|
p: ({ className, ...props }) => (
|
|
546
546
|
<p
|
|
547
|
-
className={cn("
|
|
547
|
+
className={cn("mt-5 mb-5 leading-7 first:mt-0 last:mb-0", className)}
|
|
548
548
|
{...props}
|
|
549
549
|
/>
|
|
550
550
|
),
|
|
@@ -748,7 +748,7 @@ const ThreadWelcomeSuggestions: FC = () => {
|
|
|
748
748
|
method="replace"
|
|
749
749
|
autoSend
|
|
750
750
|
>
|
|
751
|
-
<span className="line-clamp-2 text-
|
|
751
|
+
<span className="line-clamp-2 text-sm font-semibold text-ellipsis">
|
|
752
752
|
Tell me more about this
|
|
753
753
|
</span>
|
|
754
754
|
</ThreadPrimitive.Suggestion>
|
|
@@ -758,7 +758,7 @@ const ThreadWelcomeSuggestions: FC = () => {
|
|
|
758
758
|
method="replace"
|
|
759
759
|
autoSend
|
|
760
760
|
>
|
|
761
|
-
<span className="line-clamp-2 text-
|
|
761
|
+
<span className="line-clamp-2 text-sm font-semibold text-ellipsis">
|
|
762
762
|
What are the latest updates?
|
|
763
763
|
</span>
|
|
764
764
|
</ThreadPrimitive.Suggestion>
|
|
@@ -814,7 +814,7 @@ const UserMessage: FC = () => {
|
|
|
814
814
|
<MessagePrimitive.Root className="grid w-full max-w-[var(--thread-max-width)] auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] gap-y-2 py-4 [&:where(>*)]:col-start-2">
|
|
815
815
|
<UserActionBar />
|
|
816
816
|
|
|
817
|
-
<div className="bg-muted text-foreground col-start-2 row-start-2 max-w-[calc(var(--thread-max-width)*0.8)]
|
|
817
|
+
<div className="bg-muted text-foreground col-start-2 row-start-2 max-w-[calc(var(--thread-max-width)*0.8)] rounded-3xl px-5 py-2.5 break-words">
|
|
818
818
|
<MessagePrimitive.Parts />
|
|
819
819
|
</div>
|
|
820
820
|
|
|
@@ -828,7 +828,7 @@ const UserActionBar: FC = () => {
|
|
|
828
828
|
<ActionBarPrimitive.Root
|
|
829
829
|
hideWhenRunning
|
|
830
830
|
autohide="not-last"
|
|
831
|
-
className="col-start-1 row-start-2
|
|
831
|
+
className="col-start-1 row-start-2 mt-2.5 mr-3 flex flex-col items-end"
|
|
832
832
|
>
|
|
833
833
|
<ActionBarPrimitive.Edit asChild>
|
|
834
834
|
<TooltipIconButton tooltip="Edit">
|
|
@@ -904,7 +904,7 @@ const ParentIdGroup: FC<
|
|
|
904
904
|
const AssistantMessage: FC = () => {
|
|
905
905
|
return (
|
|
906
906
|
<MessagePrimitive.Root className="relative grid w-full max-w-[var(--thread-max-width)] grid-cols-[auto_auto_1fr] grid-rows-[auto_1fr] py-4">
|
|
907
|
-
<div className="text-foreground col-span-2 col-start-2 row-start-1 my-1.5 max-w-[calc(var(--thread-max-width)*0.8)] break-words
|
|
907
|
+
<div className="text-foreground col-span-2 col-start-2 row-start-1 my-1.5 max-w-[calc(var(--thread-max-width)*0.8)] leading-7 break-words">
|
|
908
908
|
<MessagePrimitive.Unstable_PartsGroupedByParentId
|
|
909
909
|
components={{
|
|
910
910
|
Text: MarkdownText,
|
|
@@ -944,7 +944,7 @@ const AssistantMessage: FC = () => {
|
|
|
944
944
|
|
|
945
945
|
<AssistantActionBar />
|
|
946
946
|
|
|
947
|
-
<BranchPicker className="col-start-2 row-start-2 -
|
|
947
|
+
<BranchPicker className="col-start-2 row-start-2 mr-2 -ml-2" />
|
|
948
948
|
</MessagePrimitive.Root>
|
|
949
949
|
);
|
|
950
950
|
};
|
|
@@ -1186,7 +1186,7 @@ function TooltipContent({
|
|
|
1186
1186
|
data-slot="tooltip-content"
|
|
1187
1187
|
sideOffset={sideOffset}
|
|
1188
1188
|
className={cn(
|
|
1189
|
-
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-[--radix-tooltip-content-transform-origin]
|
|
1189
|
+
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-[--radix-tooltip-content-transform-origin] rounded-md px-3 py-1.5 text-xs text-balance",
|
|
1190
1190
|
className,
|
|
1191
1191
|
)}
|
|
1192
1192
|
{...props}
|
|
@@ -1248,17 +1248,17 @@ export default nextConfig;
|
|
|
1248
1248
|
"lint": "eslint ."
|
|
1249
1249
|
},
|
|
1250
1250
|
"dependencies": {
|
|
1251
|
-
"@ai-sdk/openai": "^2.0.
|
|
1251
|
+
"@ai-sdk/openai": "^2.0.52",
|
|
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.5.
|
|
1260
|
-
"react": "19.
|
|
1261
|
-
"react-dom": "19.
|
|
1258
|
+
"lucide-react": "^0.546.0",
|
|
1259
|
+
"next": "15.5.6",
|
|
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
1264
|
"tw-animate-css": "^1.4.0"
|
|
@@ -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.5.
|
|
1272
|
+
"eslint-config-next": "15.5.6",
|
|
1273
1273
|
"postcss": "^8",
|
|
1274
|
-
"tailwindcss": "^4.1.
|
|
1274
|
+
"tailwindcss": "^4.1.14",
|
|
1275
1275
|
"typescript": "^5"
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|