@assistant-ui/mcp-docs-server 0.1.1

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.
Files changed (109) hide show
  1. package/.docs/organized/code-examples/local-ollama.md +1135 -0
  2. package/.docs/organized/code-examples/search-agent-for-e-commerce.md +1721 -0
  3. package/.docs/organized/code-examples/with-ai-sdk.md +1081 -0
  4. package/.docs/organized/code-examples/with-cloud.md +1164 -0
  5. package/.docs/organized/code-examples/with-external-store.md +1064 -0
  6. package/.docs/organized/code-examples/with-ffmpeg.md +1305 -0
  7. package/.docs/organized/code-examples/with-langgraph.md +1819 -0
  8. package/.docs/organized/code-examples/with-openai-assistants.md +1175 -0
  9. package/.docs/organized/code-examples/with-react-hook-form.md +1727 -0
  10. package/.docs/organized/code-examples/with-vercel-ai-rsc.md +1157 -0
  11. package/.docs/raw/blog/2024-07-29-hello/index.mdx +65 -0
  12. package/.docs/raw/blog/2024-09-11/index.mdx +10 -0
  13. package/.docs/raw/blog/2024-12-15/index.mdx +10 -0
  14. package/.docs/raw/blog/2025-01-31-changelog/index.mdx +129 -0
  15. package/.docs/raw/docs/about-assistantui.mdx +44 -0
  16. package/.docs/raw/docs/api-reference/context-providers/AssistantRuntimeProvider.mdx +30 -0
  17. package/.docs/raw/docs/api-reference/context-providers/TextContentPartProvider.mdx +26 -0
  18. package/.docs/raw/docs/api-reference/integrations/react-hook-form.mdx +103 -0
  19. package/.docs/raw/docs/api-reference/integrations/vercel-ai-sdk.mdx +145 -0
  20. package/.docs/raw/docs/api-reference/overview.mdx +583 -0
  21. package/.docs/raw/docs/api-reference/primitives/ActionBar.mdx +264 -0
  22. package/.docs/raw/docs/api-reference/primitives/AssistantModal.mdx +129 -0
  23. package/.docs/raw/docs/api-reference/primitives/Attachment.mdx +96 -0
  24. package/.docs/raw/docs/api-reference/primitives/BranchPicker.mdx +87 -0
  25. package/.docs/raw/docs/api-reference/primitives/Composer.mdx +204 -0
  26. package/.docs/raw/docs/api-reference/primitives/ContentPart.mdx +173 -0
  27. package/.docs/raw/docs/api-reference/primitives/Error.mdx +70 -0
  28. package/.docs/raw/docs/api-reference/primitives/Message.mdx +181 -0
  29. package/.docs/raw/docs/api-reference/primitives/Thread.mdx +197 -0
  30. package/.docs/raw/docs/api-reference/primitives/composition.mdx +21 -0
  31. package/.docs/raw/docs/api-reference/runtimes/AssistantRuntime.mdx +33 -0
  32. package/.docs/raw/docs/api-reference/runtimes/AttachmentRuntime.mdx +46 -0
  33. package/.docs/raw/docs/api-reference/runtimes/ComposerRuntime.mdx +69 -0
  34. package/.docs/raw/docs/api-reference/runtimes/ContentPartRuntime.mdx +22 -0
  35. package/.docs/raw/docs/api-reference/runtimes/MessageRuntime.mdx +49 -0
  36. package/.docs/raw/docs/api-reference/runtimes/ThreadListItemRuntime.mdx +32 -0
  37. package/.docs/raw/docs/api-reference/runtimes/ThreadListRuntime.mdx +31 -0
  38. package/.docs/raw/docs/api-reference/runtimes/ThreadRuntime.mdx +48 -0
  39. package/.docs/raw/docs/architecture.mdx +92 -0
  40. package/.docs/raw/docs/cloud/authorization.mdx +152 -0
  41. package/.docs/raw/docs/cloud/overview.mdx +55 -0
  42. package/.docs/raw/docs/cloud/persistence/ai-sdk.mdx +54 -0
  43. package/.docs/raw/docs/cloud/persistence/langgraph.mdx +123 -0
  44. package/.docs/raw/docs/concepts/architecture.mdx +19 -0
  45. package/.docs/raw/docs/concepts/runtime-layer.mdx +163 -0
  46. package/.docs/raw/docs/concepts/why.mdx +9 -0
  47. package/.docs/raw/docs/copilots/make-assistant-readable.mdx +71 -0
  48. package/.docs/raw/docs/copilots/make-assistant-tool-ui.mdx +76 -0
  49. package/.docs/raw/docs/copilots/make-assistant-tool.mdx +117 -0
  50. package/.docs/raw/docs/copilots/model-context.mdx +135 -0
  51. package/.docs/raw/docs/copilots/motivation.mdx +191 -0
  52. package/.docs/raw/docs/copilots/use-assistant-instructions.mdx +62 -0
  53. package/.docs/raw/docs/getting-started.mdx +1133 -0
  54. package/.docs/raw/docs/guides/Attachments.mdx +640 -0
  55. package/.docs/raw/docs/guides/Branching.mdx +59 -0
  56. package/.docs/raw/docs/guides/Editing.mdx +56 -0
  57. package/.docs/raw/docs/guides/Speech.mdx +43 -0
  58. package/.docs/raw/docs/guides/ToolUI.mdx +663 -0
  59. package/.docs/raw/docs/guides/Tools.mdx +496 -0
  60. package/.docs/raw/docs/index.mdx +7 -0
  61. package/.docs/raw/docs/legacy/styled/AssistantModal.mdx +85 -0
  62. package/.docs/raw/docs/legacy/styled/Decomposition.mdx +633 -0
  63. package/.docs/raw/docs/legacy/styled/Markdown.mdx +86 -0
  64. package/.docs/raw/docs/legacy/styled/Scrollbar.mdx +71 -0
  65. package/.docs/raw/docs/legacy/styled/Thread.mdx +84 -0
  66. package/.docs/raw/docs/legacy/styled/ThreadWidth.mdx +21 -0
  67. package/.docs/raw/docs/mcp-docs-server.mdx +324 -0
  68. package/.docs/raw/docs/migrations/deprecation-policy.mdx +41 -0
  69. package/.docs/raw/docs/migrations/v0-7.mdx +188 -0
  70. package/.docs/raw/docs/migrations/v0-8.mdx +160 -0
  71. package/.docs/raw/docs/migrations/v0-9.mdx +75 -0
  72. package/.docs/raw/docs/react-compatibility.mdx +208 -0
  73. package/.docs/raw/docs/runtimes/ai-sdk/rsc.mdx +226 -0
  74. package/.docs/raw/docs/runtimes/ai-sdk/use-assistant-hook.mdx +195 -0
  75. package/.docs/raw/docs/runtimes/ai-sdk/use-chat-hook.mdx +138 -0
  76. package/.docs/raw/docs/runtimes/ai-sdk/use-chat.mdx +136 -0
  77. package/.docs/raw/docs/runtimes/custom/external-store.mdx +1624 -0
  78. package/.docs/raw/docs/runtimes/custom/local.mdx +1185 -0
  79. package/.docs/raw/docs/runtimes/helicone.mdx +60 -0
  80. package/.docs/raw/docs/runtimes/langgraph/index.mdx +320 -0
  81. package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +11 -0
  82. package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +28 -0
  83. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +120 -0
  84. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +336 -0
  85. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +385 -0
  86. package/.docs/raw/docs/runtimes/langserve.mdx +126 -0
  87. package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +218 -0
  88. package/.docs/raw/docs/runtimes/mastra/overview.mdx +17 -0
  89. package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +196 -0
  90. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +222 -0
  91. package/.docs/raw/docs/ui/AssistantModal.mdx +46 -0
  92. package/.docs/raw/docs/ui/AssistantSidebar.mdx +42 -0
  93. package/.docs/raw/docs/ui/Attachment.mdx +82 -0
  94. package/.docs/raw/docs/ui/Markdown.mdx +72 -0
  95. package/.docs/raw/docs/ui/Mermaid.mdx +79 -0
  96. package/.docs/raw/docs/ui/Scrollbar.mdx +59 -0
  97. package/.docs/raw/docs/ui/SyntaxHighlighting.mdx +253 -0
  98. package/.docs/raw/docs/ui/Thread.mdx +47 -0
  99. package/.docs/raw/docs/ui/ThreadList.mdx +49 -0
  100. package/.docs/raw/docs/ui/ToolFallback.mdx +64 -0
  101. package/.docs/raw/docs/ui/primitives/Thread.mdx +197 -0
  102. package/LICENSE +21 -0
  103. package/README.md +128 -0
  104. package/dist/chunk-C7O7EFKU.js +38 -0
  105. package/dist/chunk-CZCDQ3YH.js +420 -0
  106. package/dist/index.js +1 -0
  107. package/dist/prepare-docs/prepare.js +199 -0
  108. package/dist/stdio.js +8 -0
  109. package/package.json +43 -0
@@ -0,0 +1,1064 @@
1
+ # Example: with-external-store
2
+
3
+ ## app/globals.css
4
+
5
+ ```css
6
+ @import "tailwindcss";
7
+ @import "tw-animate-css";
8
+
9
+ @custom-variant dark (&:is(.dark *));
10
+
11
+ @theme inline {
12
+ --color-background: var(--background);
13
+ --color-foreground: var(--foreground);
14
+ --font-sans: var(--font-geist-sans);
15
+ --font-mono: var(--font-geist-mono);
16
+ --color-sidebar-ring: var(--sidebar-ring);
17
+ --color-sidebar-border: var(--sidebar-border);
18
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
19
+ --color-sidebar-accent: var(--sidebar-accent);
20
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
21
+ --color-sidebar-primary: var(--sidebar-primary);
22
+ --color-sidebar-foreground: var(--sidebar-foreground);
23
+ --color-sidebar: var(--sidebar);
24
+ --color-chart-5: var(--chart-5);
25
+ --color-chart-4: var(--chart-4);
26
+ --color-chart-3: var(--chart-3);
27
+ --color-chart-2: var(--chart-2);
28
+ --color-chart-1: var(--chart-1);
29
+ --color-ring: var(--ring);
30
+ --color-input: var(--input);
31
+ --color-border: var(--border);
32
+ --color-destructive: var(--destructive);
33
+ --color-accent-foreground: var(--accent-foreground);
34
+ --color-accent: var(--accent);
35
+ --color-muted-foreground: var(--muted-foreground);
36
+ --color-muted: var(--muted);
37
+ --color-secondary-foreground: var(--secondary-foreground);
38
+ --color-secondary: var(--secondary);
39
+ --color-primary-foreground: var(--primary-foreground);
40
+ --color-primary: var(--primary);
41
+ --color-popover-foreground: var(--popover-foreground);
42
+ --color-popover: var(--popover);
43
+ --color-card-foreground: var(--card-foreground);
44
+ --color-card: var(--card);
45
+ --radius-sm: calc(var(--radius) - 4px);
46
+ --radius-md: calc(var(--radius) - 2px);
47
+ --radius-lg: var(--radius);
48
+ --radius-xl: calc(var(--radius) + 4px);
49
+ }
50
+
51
+ :root {
52
+ --radius: 0.625rem;
53
+ --background: oklch(1 0 0);
54
+ --foreground: oklch(0.141 0.005 285.823);
55
+ --card: oklch(1 0 0);
56
+ --card-foreground: oklch(0.141 0.005 285.823);
57
+ --popover: oklch(1 0 0);
58
+ --popover-foreground: oklch(0.141 0.005 285.823);
59
+ --primary: oklch(0.21 0.006 285.885);
60
+ --primary-foreground: oklch(0.985 0 0);
61
+ --secondary: oklch(0.967 0.001 286.375);
62
+ --secondary-foreground: oklch(0.21 0.006 285.885);
63
+ --muted: oklch(0.967 0.001 286.375);
64
+ --muted-foreground: oklch(0.552 0.016 285.938);
65
+ --accent: oklch(0.967 0.001 286.375);
66
+ --accent-foreground: oklch(0.21 0.006 285.885);
67
+ --destructive: oklch(0.577 0.245 27.325);
68
+ --border: oklch(0.92 0.004 286.32);
69
+ --input: oklch(0.92 0.004 286.32);
70
+ --ring: oklch(0.705 0.015 286.067);
71
+ --chart-1: oklch(0.646 0.222 41.116);
72
+ --chart-2: oklch(0.6 0.118 184.704);
73
+ --chart-3: oklch(0.398 0.07 227.392);
74
+ --chart-4: oklch(0.828 0.189 84.429);
75
+ --chart-5: oklch(0.769 0.188 70.08);
76
+ --sidebar: oklch(0.985 0 0);
77
+ --sidebar-foreground: oklch(0.141 0.005 285.823);
78
+ --sidebar-primary: oklch(0.21 0.006 285.885);
79
+ --sidebar-primary-foreground: oklch(0.985 0 0);
80
+ --sidebar-accent: oklch(0.967 0.001 286.375);
81
+ --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
82
+ --sidebar-border: oklch(0.92 0.004 286.32);
83
+ --sidebar-ring: oklch(0.705 0.015 286.067);
84
+ }
85
+
86
+ .dark {
87
+ --background: oklch(0.141 0.005 285.823);
88
+ --foreground: oklch(0.985 0 0);
89
+ --card: oklch(0.21 0.006 285.885);
90
+ --card-foreground: oklch(0.985 0 0);
91
+ --popover: oklch(0.21 0.006 285.885);
92
+ --popover-foreground: oklch(0.985 0 0);
93
+ --primary: oklch(0.92 0.004 286.32);
94
+ --primary-foreground: oklch(0.21 0.006 285.885);
95
+ --secondary: oklch(0.274 0.006 286.033);
96
+ --secondary-foreground: oklch(0.985 0 0);
97
+ --muted: oklch(0.274 0.006 286.033);
98
+ --muted-foreground: oklch(0.705 0.015 286.067);
99
+ --accent: oklch(0.274 0.006 286.033);
100
+ --accent-foreground: oklch(0.985 0 0);
101
+ --destructive: oklch(0.704 0.191 22.216);
102
+ --border: oklch(1 0 0 / 10%);
103
+ --input: oklch(1 0 0 / 15%);
104
+ --ring: oklch(0.552 0.016 285.938);
105
+ --chart-1: oklch(0.488 0.243 264.376);
106
+ --chart-2: oklch(0.696 0.17 162.48);
107
+ --chart-3: oklch(0.769 0.188 70.08);
108
+ --chart-4: oklch(0.627 0.265 303.9);
109
+ --chart-5: oklch(0.645 0.246 16.439);
110
+ --sidebar: oklch(0.21 0.006 285.885);
111
+ --sidebar-foreground: oklch(0.985 0 0);
112
+ --sidebar-primary: oklch(0.488 0.243 264.376);
113
+ --sidebar-primary-foreground: oklch(0.985 0 0);
114
+ --sidebar-accent: oklch(0.274 0.006 286.033);
115
+ --sidebar-accent-foreground: oklch(0.985 0 0);
116
+ --sidebar-border: oklch(1 0 0 / 10%);
117
+ --sidebar-ring: oklch(0.552 0.016 285.938);
118
+ }
119
+
120
+ @layer base {
121
+ * {
122
+ @apply border-border outline-ring/50;
123
+ }
124
+ body {
125
+ @apply bg-background text-foreground;
126
+ }
127
+ }
128
+
129
+ ```
130
+
131
+ ## app/layout.tsx
132
+
133
+ ```tsx
134
+ import type { Metadata } from "next";
135
+ import { MyRuntimeProvider } from "@/app/MyRuntimeProvider";
136
+
137
+ import "./globals.css";
138
+
139
+ export const metadata: Metadata = {
140
+ title: "Create Next App",
141
+ description: "Generated by create next app",
142
+ };
143
+
144
+ export default function RootLayout({
145
+ children,
146
+ }: Readonly<{
147
+ children: React.ReactNode;
148
+ }>) {
149
+ return (
150
+ <MyRuntimeProvider>
151
+ <html lang="en" className="h-dvh">
152
+ <body className="h-dvh font-sans">{children}</body>
153
+ </html>
154
+ </MyRuntimeProvider>
155
+ );
156
+ }
157
+
158
+ ```
159
+
160
+ ## app/MyRuntimeProvider.tsx
161
+
162
+ ```tsx
163
+ "use client";
164
+
165
+ import { ThreadMessageLike } from "@assistant-ui/react";
166
+ import { AppendMessage } from "@assistant-ui/react";
167
+ import {
168
+ AssistantRuntimeProvider,
169
+ useExternalStoreRuntime,
170
+ } from "@assistant-ui/react";
171
+ import { useState } from "react";
172
+
173
+ const convertMessage = (message: ThreadMessageLike) => {
174
+ return message;
175
+ };
176
+
177
+ export function MyRuntimeProvider({
178
+ children,
179
+ }: Readonly<{
180
+ children: React.ReactNode;
181
+ }>) {
182
+ const [messages, setMessages] = useState<readonly ThreadMessageLike[]>([]);
183
+
184
+ const onNew = async (message: AppendMessage) => {
185
+ if (message.content.length !== 1 || message.content[0]?.type !== "text")
186
+ throw new Error("Only text content is supported");
187
+
188
+ const userMessage: ThreadMessageLike = {
189
+ role: "user",
190
+ content: [{ type: "text", text: message.content[0].text }],
191
+ };
192
+ setMessages((currentMessages) => [...currentMessages, userMessage]);
193
+
194
+ // normally you would perform an API call here to get the assistant response
195
+ await new Promise((resolve) => setTimeout(resolve, 1000));
196
+
197
+ const assistantMessage: ThreadMessageLike = {
198
+ role: "assistant",
199
+ content: [{ type: "text", text: "Hello, world!" }],
200
+ };
201
+ setMessages((currentMessages) => [...currentMessages, assistantMessage]);
202
+ };
203
+
204
+ const runtime = useExternalStoreRuntime<ThreadMessageLike>({
205
+ messages,
206
+ setMessages,
207
+ onNew,
208
+ convertMessage,
209
+ });
210
+
211
+ return (
212
+ <AssistantRuntimeProvider runtime={runtime}>
213
+ {children}
214
+ </AssistantRuntimeProvider>
215
+ );
216
+ }
217
+
218
+ ```
219
+
220
+ ## app/page.tsx
221
+
222
+ ```tsx
223
+ "use client";
224
+
225
+ import { Thread } from "@/components/assistant-ui/thread";
226
+
227
+ export default function Home() {
228
+ return (
229
+ <main className="h-dvh">
230
+ <Thread />
231
+ </main>
232
+ );
233
+ }
234
+
235
+ ```
236
+
237
+ ## components.json
238
+
239
+ ```json
240
+ {
241
+ "$schema": "https://ui.shadcn.com/schema.json",
242
+ "style": "new-york",
243
+ "rsc": true,
244
+ "tsx": true,
245
+ "tailwind": {
246
+ "config": "",
247
+ "css": "app/globals.css",
248
+ "baseColor": "zinc",
249
+ "cssVariables": true,
250
+ "prefix": ""
251
+ },
252
+ "aliases": {
253
+ "components": "@/components",
254
+ "utils": "@/lib/utils",
255
+ "ui": "@/components/ui",
256
+ "lib": "@/lib",
257
+ "hooks": "@/hooks"
258
+ },
259
+ "iconLibrary": "lucide"
260
+ }
261
+
262
+ ```
263
+
264
+ ## components/assistant-ui/markdown-text.tsx
265
+
266
+ ```tsx
267
+ "use client";
268
+
269
+ import "@assistant-ui/react-markdown/styles/dot.css";
270
+
271
+ import {
272
+ CodeHeaderProps,
273
+ MarkdownTextPrimitive,
274
+ unstable_memoizeMarkdownComponents as memoizeMarkdownComponents,
275
+ useIsMarkdownCodeBlock,
276
+ } from "@assistant-ui/react-markdown";
277
+ import remarkGfm from "remark-gfm";
278
+ import { FC, memo, useState } from "react";
279
+ import { CheckIcon, CopyIcon } from "lucide-react";
280
+
281
+ import { TooltipIconButton } from "@/components/assistant-ui/tooltip-icon-button";
282
+ import { cn } from "@/lib/utils";
283
+
284
+ const MarkdownTextImpl = () => {
285
+ return (
286
+ <MarkdownTextPrimitive
287
+ remarkPlugins={[remarkGfm]}
288
+ className="aui-md"
289
+ components={defaultComponents}
290
+ />
291
+ );
292
+ };
293
+
294
+ export const MarkdownText = memo(MarkdownTextImpl);
295
+
296
+ const CodeHeader: FC<CodeHeaderProps> = ({ language, code }) => {
297
+ const { isCopied, copyToClipboard } = useCopyToClipboard();
298
+ const onCopy = () => {
299
+ if (!code || isCopied) return;
300
+ copyToClipboard(code);
301
+ };
302
+
303
+ return (
304
+ <div className="flex items-center justify-between gap-4 rounded-t-lg bg-zinc-900 px-4 py-2 text-sm font-semibold text-white">
305
+ <span className="lowercase [&>span]:text-xs">{language}</span>
306
+ <TooltipIconButton tooltip="Copy" onClick={onCopy}>
307
+ {!isCopied && <CopyIcon />}
308
+ {isCopied && <CheckIcon />}
309
+ </TooltipIconButton>
310
+ </div>
311
+ );
312
+ };
313
+
314
+ const useCopyToClipboard = ({
315
+ copiedDuration = 3000,
316
+ }: {
317
+ copiedDuration?: number;
318
+ } = {}) => {
319
+ const [isCopied, setIsCopied] = useState<boolean>(false);
320
+
321
+ const copyToClipboard = (value: string) => {
322
+ if (!value) return;
323
+
324
+ navigator.clipboard.writeText(value).then(() => {
325
+ setIsCopied(true);
326
+ setTimeout(() => setIsCopied(false), copiedDuration);
327
+ });
328
+ };
329
+
330
+ return { isCopied, copyToClipboard };
331
+ };
332
+
333
+ const defaultComponents = memoizeMarkdownComponents({
334
+ h1: ({ className, ...props }) => (
335
+ <h1
336
+ className={cn(
337
+ "mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0",
338
+ className,
339
+ )}
340
+ {...props}
341
+ />
342
+ ),
343
+ h2: ({ className, ...props }) => (
344
+ <h2
345
+ className={cn(
346
+ "mb-4 mt-8 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",
347
+ className,
348
+ )}
349
+ {...props}
350
+ />
351
+ ),
352
+ h3: ({ className, ...props }) => (
353
+ <h3
354
+ className={cn(
355
+ "mb-4 mt-6 scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",
356
+ className,
357
+ )}
358
+ {...props}
359
+ />
360
+ ),
361
+ h4: ({ className, ...props }) => (
362
+ <h4
363
+ className={cn(
364
+ "mb-4 mt-6 scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",
365
+ className,
366
+ )}
367
+ {...props}
368
+ />
369
+ ),
370
+ h5: ({ className, ...props }) => (
371
+ <h5
372
+ className={cn(
373
+ "my-4 text-lg font-semibold first:mt-0 last:mb-0",
374
+ className,
375
+ )}
376
+ {...props}
377
+ />
378
+ ),
379
+ h6: ({ className, ...props }) => (
380
+ <h6
381
+ className={cn("my-4 font-semibold first:mt-0 last:mb-0", className)}
382
+ {...props}
383
+ />
384
+ ),
385
+ p: ({ className, ...props }) => (
386
+ <p
387
+ className={cn("mb-5 mt-5 leading-7 first:mt-0 last:mb-0", className)}
388
+ {...props}
389
+ />
390
+ ),
391
+ a: ({ className, ...props }) => (
392
+ <a
393
+ className={cn(
394
+ "text-primary font-medium underline underline-offset-4",
395
+ className,
396
+ )}
397
+ {...props}
398
+ />
399
+ ),
400
+ blockquote: ({ className, ...props }) => (
401
+ <blockquote
402
+ className={cn("border-l-2 pl-6 italic", className)}
403
+ {...props}
404
+ />
405
+ ),
406
+ ul: ({ className, ...props }) => (
407
+ <ul
408
+ className={cn("my-5 ml-6 list-disc [&>li]:mt-2", className)}
409
+ {...props}
410
+ />
411
+ ),
412
+ ol: ({ className, ...props }) => (
413
+ <ol
414
+ className={cn("my-5 ml-6 list-decimal [&>li]:mt-2", className)}
415
+ {...props}
416
+ />
417
+ ),
418
+ hr: ({ className, ...props }) => (
419
+ <hr className={cn("my-5 border-b", className)} {...props} />
420
+ ),
421
+ table: ({ className, ...props }) => (
422
+ <table
423
+ className={cn(
424
+ "my-5 w-full border-separate border-spacing-0 overflow-y-auto",
425
+ className,
426
+ )}
427
+ {...props}
428
+ />
429
+ ),
430
+ th: ({ className, ...props }) => (
431
+ <th
432
+ className={cn(
433
+ "bg-muted px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [&[align=center]]:text-center [&[align=right]]:text-right",
434
+ className,
435
+ )}
436
+ {...props}
437
+ />
438
+ ),
439
+ td: ({ className, ...props }) => (
440
+ <td
441
+ className={cn(
442
+ "border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
443
+ className,
444
+ )}
445
+ {...props}
446
+ />
447
+ ),
448
+ tr: ({ className, ...props }) => (
449
+ <tr
450
+ className={cn(
451
+ "m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",
452
+ className,
453
+ )}
454
+ {...props}
455
+ />
456
+ ),
457
+ sup: ({ className, ...props }) => (
458
+ <sup
459
+ className={cn("[&>a]:text-xs [&>a]:no-underline", className)}
460
+ {...props}
461
+ />
462
+ ),
463
+ pre: ({ className, ...props }) => (
464
+ <pre
465
+ className={cn(
466
+ "overflow-x-auto rounded-b-lg bg-black p-4 text-white",
467
+ className,
468
+ )}
469
+ {...props}
470
+ />
471
+ ),
472
+ code: function Code({ className, ...props }) {
473
+ const isCodeBlock = useIsMarkdownCodeBlock();
474
+ return (
475
+ <code
476
+ className={cn(
477
+ !isCodeBlock && "bg-muted rounded border font-semibold",
478
+ className,
479
+ )}
480
+ {...props}
481
+ />
482
+ );
483
+ },
484
+ CodeHeader,
485
+ });
486
+
487
+ ```
488
+
489
+ ## components/assistant-ui/thread.tsx
490
+
491
+ ```tsx
492
+ import {
493
+ ActionBarPrimitive,
494
+ BranchPickerPrimitive,
495
+ ComposerPrimitive,
496
+ MessagePrimitive,
497
+ ThreadPrimitive,
498
+ } from "@assistant-ui/react";
499
+ import type { FC } from "react";
500
+ import {
501
+ ArrowDownIcon,
502
+ CheckIcon,
503
+ ChevronLeftIcon,
504
+ ChevronRightIcon,
505
+ CopyIcon,
506
+ PencilIcon,
507
+ RefreshCwIcon,
508
+ SendHorizontalIcon,
509
+ } from "lucide-react";
510
+ import { cn } from "@/lib/utils";
511
+
512
+ import { Button } from "@/components/ui/button";
513
+ import { MarkdownText } from "@/components/assistant-ui/markdown-text";
514
+ import { TooltipIconButton } from "@/components/assistant-ui/tooltip-icon-button";
515
+
516
+ export const Thread: FC = () => {
517
+ return (
518
+ <ThreadPrimitive.Root
519
+ className="bg-background box-border flex h-full flex-col overflow-hidden"
520
+ style={{
521
+ ["--thread-max-width" as string]: "42rem",
522
+ }}
523
+ >
524
+ <ThreadPrimitive.Viewport className="flex h-full flex-col items-center overflow-y-scroll scroll-smooth bg-inherit px-4 pt-8">
525
+ <ThreadWelcome />
526
+
527
+ <ThreadPrimitive.Messages
528
+ components={{
529
+ UserMessage: UserMessage,
530
+ EditComposer: EditComposer,
531
+ AssistantMessage: AssistantMessage,
532
+ }}
533
+ />
534
+
535
+ <ThreadPrimitive.If empty={false}>
536
+ <div className="min-h-8 flex-grow" />
537
+ </ThreadPrimitive.If>
538
+
539
+ <div className="sticky bottom-0 mt-3 flex w-full max-w-[var(--thread-max-width)] flex-col items-center justify-end rounded-t-lg bg-inherit pb-4">
540
+ <ThreadScrollToBottom />
541
+ <Composer />
542
+ </div>
543
+ </ThreadPrimitive.Viewport>
544
+ </ThreadPrimitive.Root>
545
+ );
546
+ };
547
+
548
+ const ThreadScrollToBottom: FC = () => {
549
+ return (
550
+ <ThreadPrimitive.ScrollToBottom asChild>
551
+ <TooltipIconButton
552
+ tooltip="Scroll to bottom"
553
+ variant="outline"
554
+ className="absolute -top-8 rounded-full disabled:invisible"
555
+ >
556
+ <ArrowDownIcon />
557
+ </TooltipIconButton>
558
+ </ThreadPrimitive.ScrollToBottom>
559
+ );
560
+ };
561
+
562
+ const ThreadWelcome: FC = () => {
563
+ return (
564
+ <ThreadPrimitive.Empty>
565
+ <div className="flex w-full max-w-[var(--thread-max-width)] flex-grow flex-col">
566
+ <div className="flex w-full flex-grow flex-col items-center justify-center">
567
+ <p className="mt-4 font-medium">How can I help you today?</p>
568
+ </div>
569
+ <ThreadWelcomeSuggestions />
570
+ </div>
571
+ </ThreadPrimitive.Empty>
572
+ );
573
+ };
574
+
575
+ const ThreadWelcomeSuggestions: FC = () => {
576
+ return (
577
+ <div className="mt-3 flex w-full items-stretch justify-center gap-4">
578
+ <ThreadPrimitive.Suggestion
579
+ className="hover:bg-muted/80 flex max-w-sm grow basis-0 flex-col items-center justify-center rounded-lg border p-3 transition-colors ease-in"
580
+ prompt="What is the weather in Tokyo?"
581
+ method="replace"
582
+ autoSend
583
+ >
584
+ <span className="line-clamp-2 text-ellipsis text-sm font-semibold">
585
+ What is the weather in Tokyo?
586
+ </span>
587
+ </ThreadPrimitive.Suggestion>
588
+ <ThreadPrimitive.Suggestion
589
+ className="hover:bg-muted/80 flex max-w-sm grow basis-0 flex-col items-center justify-center rounded-lg border p-3 transition-colors ease-in"
590
+ prompt="What is assistant-ui?"
591
+ method="replace"
592
+ autoSend
593
+ >
594
+ <span className="line-clamp-2 text-ellipsis text-sm font-semibold">
595
+ What is assistant-ui?
596
+ </span>
597
+ </ThreadPrimitive.Suggestion>
598
+ </div>
599
+ );
600
+ };
601
+
602
+ const Composer: FC = () => {
603
+ return (
604
+ <ComposerPrimitive.Root className="focus-within:border-ring/20 flex w-full flex-wrap items-end rounded-lg border bg-inherit px-2.5 shadow-sm transition-colors ease-in">
605
+ <ComposerPrimitive.Input
606
+ rows={1}
607
+ autoFocus
608
+ placeholder="Write a message..."
609
+ className="placeholder:text-muted-foreground max-h-40 flex-grow resize-none border-none bg-transparent px-2 py-4 text-sm outline-none focus:ring-0 disabled:cursor-not-allowed"
610
+ />
611
+ <ComposerAction />
612
+ </ComposerPrimitive.Root>
613
+ );
614
+ };
615
+
616
+ const ComposerAction: FC = () => {
617
+ return (
618
+ <>
619
+ <ThreadPrimitive.If running={false}>
620
+ <ComposerPrimitive.Send asChild>
621
+ <TooltipIconButton
622
+ tooltip="Send"
623
+ variant="default"
624
+ className="my-2.5 size-8 p-2 transition-opacity ease-in"
625
+ >
626
+ <SendHorizontalIcon />
627
+ </TooltipIconButton>
628
+ </ComposerPrimitive.Send>
629
+ </ThreadPrimitive.If>
630
+ <ThreadPrimitive.If running>
631
+ <ComposerPrimitive.Cancel asChild>
632
+ <TooltipIconButton
633
+ tooltip="Cancel"
634
+ variant="default"
635
+ className="my-2.5 size-8 p-2 transition-opacity ease-in"
636
+ >
637
+ <CircleStopIcon />
638
+ </TooltipIconButton>
639
+ </ComposerPrimitive.Cancel>
640
+ </ThreadPrimitive.If>
641
+ </>
642
+ );
643
+ };
644
+
645
+ const UserMessage: FC = () => {
646
+ return (
647
+ <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">
648
+ <UserActionBar />
649
+
650
+ <div className="bg-muted text-foreground col-start-2 row-start-2 max-w-[calc(var(--thread-max-width)*0.8)] break-words rounded-3xl px-5 py-2.5">
651
+ <MessagePrimitive.Content />
652
+ </div>
653
+
654
+ <BranchPicker className="col-span-full col-start-1 row-start-3 -mr-1 justify-end" />
655
+ </MessagePrimitive.Root>
656
+ );
657
+ };
658
+
659
+ const UserActionBar: FC = () => {
660
+ return (
661
+ <ActionBarPrimitive.Root
662
+ hideWhenRunning
663
+ autohide="not-last"
664
+ className="col-start-1 row-start-2 mr-3 mt-2.5 flex flex-col items-end"
665
+ >
666
+ <ActionBarPrimitive.Edit asChild>
667
+ <TooltipIconButton tooltip="Edit">
668
+ <PencilIcon />
669
+ </TooltipIconButton>
670
+ </ActionBarPrimitive.Edit>
671
+ </ActionBarPrimitive.Root>
672
+ );
673
+ };
674
+
675
+ const EditComposer: FC = () => {
676
+ return (
677
+ <ComposerPrimitive.Root className="bg-muted my-4 flex w-full max-w-[var(--thread-max-width)] flex-col gap-2 rounded-xl">
678
+ <ComposerPrimitive.Input className="text-foreground flex h-8 w-full resize-none bg-transparent p-4 pb-0 outline-none" />
679
+
680
+ <div className="mx-3 mb-3 flex items-center justify-center gap-2 self-end">
681
+ <ComposerPrimitive.Cancel asChild>
682
+ <Button variant="ghost">Cancel</Button>
683
+ </ComposerPrimitive.Cancel>
684
+ <ComposerPrimitive.Send asChild>
685
+ <Button>Send</Button>
686
+ </ComposerPrimitive.Send>
687
+ </div>
688
+ </ComposerPrimitive.Root>
689
+ );
690
+ };
691
+
692
+ const AssistantMessage: FC = () => {
693
+ return (
694
+ <MessagePrimitive.Root className="relative grid w-full max-w-[var(--thread-max-width)] grid-cols-[auto_auto_1fr] grid-rows-[auto_1fr] py-4">
695
+ <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 leading-7">
696
+ <MessagePrimitive.Content components={{ Text: MarkdownText }} />
697
+ </div>
698
+
699
+ <AssistantActionBar />
700
+
701
+ <BranchPicker className="col-start-2 row-start-2 -ml-2 mr-2" />
702
+ </MessagePrimitive.Root>
703
+ );
704
+ };
705
+
706
+ const AssistantActionBar: FC = () => {
707
+ return (
708
+ <ActionBarPrimitive.Root
709
+ hideWhenRunning
710
+ autohide="not-last"
711
+ autohideFloat="single-branch"
712
+ className="text-muted-foreground data-[floating]:bg-background col-start-3 row-start-2 -ml-1 flex gap-1 data-[floating]:absolute data-[floating]:rounded-md data-[floating]:border data-[floating]:p-1 data-[floating]:shadow-sm"
713
+ >
714
+ <ActionBarPrimitive.Copy asChild>
715
+ <TooltipIconButton tooltip="Copy">
716
+ <MessagePrimitive.If copied>
717
+ <CheckIcon />
718
+ </MessagePrimitive.If>
719
+ <MessagePrimitive.If copied={false}>
720
+ <CopyIcon />
721
+ </MessagePrimitive.If>
722
+ </TooltipIconButton>
723
+ </ActionBarPrimitive.Copy>
724
+ <ActionBarPrimitive.Reload asChild>
725
+ <TooltipIconButton tooltip="Refresh">
726
+ <RefreshCwIcon />
727
+ </TooltipIconButton>
728
+ </ActionBarPrimitive.Reload>
729
+ </ActionBarPrimitive.Root>
730
+ );
731
+ };
732
+
733
+ const BranchPicker: FC<BranchPickerPrimitive.Root.Props> = ({
734
+ className,
735
+ ...rest
736
+ }) => {
737
+ return (
738
+ <BranchPickerPrimitive.Root
739
+ hideWhenSingleBranch
740
+ className={cn(
741
+ "text-muted-foreground inline-flex items-center text-xs",
742
+ className,
743
+ )}
744
+ {...rest}
745
+ >
746
+ <BranchPickerPrimitive.Previous asChild>
747
+ <TooltipIconButton tooltip="Previous">
748
+ <ChevronLeftIcon />
749
+ </TooltipIconButton>
750
+ </BranchPickerPrimitive.Previous>
751
+ <span className="font-medium">
752
+ <BranchPickerPrimitive.Number /> / <BranchPickerPrimitive.Count />
753
+ </span>
754
+ <BranchPickerPrimitive.Next asChild>
755
+ <TooltipIconButton tooltip="Next">
756
+ <ChevronRightIcon />
757
+ </TooltipIconButton>
758
+ </BranchPickerPrimitive.Next>
759
+ </BranchPickerPrimitive.Root>
760
+ );
761
+ };
762
+
763
+ const CircleStopIcon = () => {
764
+ return (
765
+ <svg
766
+ xmlns="http://www.w3.org/2000/svg"
767
+ viewBox="0 0 16 16"
768
+ fill="currentColor"
769
+ width="16"
770
+ height="16"
771
+ >
772
+ <rect width="10" height="10" x="3" y="3" rx="2" />
773
+ </svg>
774
+ );
775
+ };
776
+
777
+ ```
778
+
779
+ ## components/assistant-ui/tooltip-icon-button.tsx
780
+
781
+ ```tsx
782
+ "use client";
783
+
784
+ import { ComponentPropsWithoutRef, forwardRef } from "react";
785
+
786
+ import {
787
+ Tooltip,
788
+ TooltipContent,
789
+ TooltipTrigger,
790
+ } from "@/components/ui/tooltip";
791
+ import { Button } from "@/components/ui/button";
792
+ import { cn } from "@/lib/utils";
793
+
794
+ export type TooltipIconButtonProps = ComponentPropsWithoutRef<typeof Button> & {
795
+ tooltip: string;
796
+ side?: "top" | "bottom" | "left" | "right";
797
+ };
798
+
799
+ export const TooltipIconButton = forwardRef<
800
+ HTMLButtonElement,
801
+ TooltipIconButtonProps
802
+ >(({ children, tooltip, side = "bottom", className, ...rest }, ref) => {
803
+ return (
804
+ <Tooltip>
805
+ <TooltipTrigger asChild>
806
+ <Button
807
+ variant="ghost"
808
+ size="icon"
809
+ {...rest}
810
+ className={cn("size-6 p-1", className)}
811
+ ref={ref}
812
+ >
813
+ {children}
814
+ <span className="sr-only">{tooltip}</span>
815
+ </Button>
816
+ </TooltipTrigger>
817
+ <TooltipContent side={side}>{tooltip}</TooltipContent>
818
+ </Tooltip>
819
+ );
820
+ });
821
+
822
+ TooltipIconButton.displayName = "TooltipIconButton";
823
+
824
+ ```
825
+
826
+ ## components/ui/button.tsx
827
+
828
+ ```tsx
829
+ "use client";
830
+
831
+ import * as React from "react";
832
+ import { Slot } from "@radix-ui/react-slot";
833
+ import { cva, type VariantProps } from "class-variance-authority";
834
+
835
+ import { cn } from "@/lib/utils";
836
+
837
+ const buttonVariants = cva(
838
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
839
+ {
840
+ variants: {
841
+ variant: {
842
+ default:
843
+ "bg-primary text-primary-foreground shadow hover:bg-primary/90",
844
+ destructive:
845
+ "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
846
+ outline:
847
+ "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
848
+ secondary:
849
+ "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
850
+ ghost: "hover:bg-accent hover:text-accent-foreground",
851
+ link: "text-primary underline-offset-4 hover:underline",
852
+ },
853
+ size: {
854
+ default: "h-9 px-4 py-2",
855
+ sm: "h-8 rounded-md px-3 text-xs",
856
+ lg: "h-10 rounded-md px-8",
857
+ icon: "h-9 w-9",
858
+ },
859
+ },
860
+ defaultVariants: {
861
+ variant: "default",
862
+ size: "default",
863
+ },
864
+ },
865
+ );
866
+
867
+ export interface ButtonProps
868
+ extends React.ButtonHTMLAttributes<HTMLButtonElement>,
869
+ VariantProps<typeof buttonVariants> {
870
+ asChild?: boolean;
871
+ }
872
+
873
+ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
874
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
875
+ const Comp = asChild ? Slot : "button";
876
+ return (
877
+ <Comp
878
+ className={cn(buttonVariants({ variant, size, className }))}
879
+ ref={ref}
880
+ {...props}
881
+ />
882
+ );
883
+ },
884
+ );
885
+ Button.displayName = "Button";
886
+
887
+ export { Button, buttonVariants };
888
+
889
+ ```
890
+
891
+ ## components/ui/tooltip.tsx
892
+
893
+ ```tsx
894
+ "use client";
895
+
896
+ import * as React from "react";
897
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
898
+
899
+ import { cn } from "@/lib/utils";
900
+
901
+ function TooltipProvider({
902
+ delayDuration = 0,
903
+ ...props
904
+ }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
905
+ return (
906
+ <TooltipPrimitive.Provider
907
+ data-slot="tooltip-provider"
908
+ delayDuration={delayDuration}
909
+ {...props}
910
+ />
911
+ );
912
+ }
913
+
914
+ function Tooltip({
915
+ ...props
916
+ }: React.ComponentProps<typeof TooltipPrimitive.Root>) {
917
+ return (
918
+ <TooltipProvider>
919
+ <TooltipPrimitive.Root data-slot="tooltip" {...props} />
920
+ </TooltipProvider>
921
+ );
922
+ }
923
+
924
+ function TooltipTrigger({
925
+ ...props
926
+ }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
927
+ return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;
928
+ }
929
+
930
+ function TooltipContent({
931
+ className,
932
+ sideOffset = 0,
933
+ children,
934
+ ...props
935
+ }: React.ComponentProps<typeof TooltipPrimitive.Content>) {
936
+ return (
937
+ <TooltipPrimitive.Portal>
938
+ <TooltipPrimitive.Content
939
+ data-slot="tooltip-content"
940
+ sideOffset={sideOffset}
941
+ className={cn(
942
+ "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] text-balance rounded-md px-3 py-1.5 text-xs",
943
+ className,
944
+ )}
945
+ {...props}
946
+ >
947
+ {children}
948
+ <TooltipPrimitive.Arrow className="bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
949
+ </TooltipPrimitive.Content>
950
+ </TooltipPrimitive.Portal>
951
+ );
952
+ }
953
+
954
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
955
+
956
+ ```
957
+
958
+ ## eslint.config.ts
959
+
960
+ ```typescript
961
+ export { default } from "@assistant-ui/x-buildutils/eslint";
962
+
963
+ ```
964
+
965
+ ## lib/utils.ts
966
+
967
+ ```typescript
968
+ import { clsx, type ClassValue } from "clsx";
969
+ import { twMerge } from "tailwind-merge";
970
+
971
+ export function cn(...inputs: ClassValue[]) {
972
+ return twMerge(clsx(inputs));
973
+ }
974
+
975
+ ```
976
+
977
+ ## next.config.ts
978
+
979
+ ```typescript
980
+ import type { NextConfig } from "next";
981
+
982
+ const nextConfig: NextConfig = {
983
+ /* config options here */
984
+ };
985
+
986
+ export default nextConfig;
987
+
988
+ ```
989
+
990
+ ## package.json
991
+
992
+ ```json
993
+ {
994
+ "name": "with-external-store",
995
+ "version": "0.1.0",
996
+ "private": true,
997
+ "scripts": {
998
+ "dev": "next dev --turbo",
999
+ "build": "next build",
1000
+ "start": "next start",
1001
+ "lint": "next lint"
1002
+ },
1003
+ "dependencies": {
1004
+ "@ai-sdk/openai": "^1.3.22",
1005
+ "@assistant-ui/react": "workspace:*",
1006
+ "@assistant-ui/react-markdown": "workspace:*",
1007
+ "@radix-ui/react-slot": "^1.2.3",
1008
+ "@radix-ui/react-tooltip": "^1.2.7",
1009
+ "class-variance-authority": "^0.7.1",
1010
+ "clsx": "^2.1.1",
1011
+ "lucide-react": "^0.511.0",
1012
+ "next": "15.3.3",
1013
+ "react": "19.1.0",
1014
+ "react-dom": "19.1.0",
1015
+ "remark-gfm": "^4.0.1",
1016
+ "tailwind-merge": "^3.3.0",
1017
+ "tw-animate-css": "^1.3.3"
1018
+ },
1019
+ "devDependencies": {
1020
+ "@assistant-ui/x-buildutils": "workspace:*",
1021
+ "@types/node": "^22",
1022
+ "@types/react": "^19",
1023
+ "@types/react-dom": "^19",
1024
+ "eslint": "^9",
1025
+ "eslint-config-next": "15.3.3",
1026
+ "postcss": "^8",
1027
+ "tailwindcss": "^4.1.8",
1028
+ "typescript": "^5"
1029
+ }
1030
+ }
1031
+
1032
+ ```
1033
+
1034
+ ## tsconfig.json
1035
+
1036
+ ```json
1037
+ {
1038
+ "extends": "@assistant-ui/x-buildutils/ts/base",
1039
+ "compilerOptions": {
1040
+ "target": "ES6",
1041
+ "module": "ESNext",
1042
+ "incremental": true,
1043
+ "plugins": [
1044
+ {
1045
+ "name": "next"
1046
+ }
1047
+ ],
1048
+ "allowJs": true,
1049
+ "strictNullChecks": true,
1050
+ "jsx": "preserve",
1051
+ "paths": {
1052
+ "@/*": ["./*"],
1053
+ "@assistant-ui/*": ["../../packages/*/src"],
1054
+ "@assistant-ui/react/*": ["../../packages/react/src/*"],
1055
+ "assistant-stream": ["../../packages/assistant-stream/src"],
1056
+ "assistant-stream/*": ["../../packages/assistant-stream/src/*"]
1057
+ }
1058
+ },
1059
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
1060
+ "exclude": ["node_modules"]
1061
+ }
1062
+
1063
+ ```
1064
+