@assistant-ui/mcp-docs-server 0.1.29 → 0.1.31
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/waterfall.md +15 -7
- package/.docs/organized/code-examples/with-a2a.md +9 -21
- package/.docs/organized/code-examples/with-ag-ui.md +11 -8
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +10 -10
- package/.docs/organized/code-examples/with-artifacts.md +12 -10
- package/.docs/organized/code-examples/with-assistant-transport.md +11 -12
- package/.docs/organized/code-examples/with-chain-of-thought.md +83 -54
- package/.docs/organized/code-examples/with-cloud-standalone.md +14 -11
- package/.docs/organized/code-examples/with-cloud.md +9 -10
- package/.docs/organized/code-examples/with-custom-thread-list.md +61 -16
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +17 -12
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +13 -13
- package/.docs/organized/code-examples/with-expo.md +25 -21
- package/.docs/organized/code-examples/with-external-store.md +8 -8
- package/.docs/organized/code-examples/with-ffmpeg.md +17 -12
- package/.docs/organized/code-examples/with-generative-ui.md +9 -9
- package/.docs/organized/code-examples/with-google-adk.md +8 -8
- package/.docs/organized/code-examples/with-heat-graph.md +5 -5
- package/.docs/organized/code-examples/with-interactables.md +10 -25
- package/.docs/organized/code-examples/with-langchain.md +437 -0
- package/.docs/organized/code-examples/with-langgraph.md +16 -16
- package/.docs/organized/code-examples/with-livekit.md +18 -13
- package/.docs/organized/code-examples/with-opencode.md +105 -62
- package/.docs/organized/code-examples/with-parent-id-grouping.md +10 -10
- package/.docs/organized/code-examples/with-react-hook-form.md +220 -148
- package/.docs/organized/code-examples/with-react-ink.md +2 -2
- package/.docs/organized/code-examples/with-react-router.md +12 -12
- package/.docs/organized/code-examples/with-store.md +8 -5
- package/.docs/organized/code-examples/with-tanstack.md +10 -10
- package/.docs/organized/code-examples/with-tap-runtime.md +10 -6
- package/.docs/raw/docs/(docs)/cli.mdx +2 -1
- package/.docs/raw/docs/(docs)/copilots/assistant-frame.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +10 -3
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +8 -3
- package/.docs/raw/docs/(docs)/copilots/make-assistant-visible.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/model-context.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/motivation.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/use-assistant-instructions.mdx +1 -0
- package/.docs/raw/docs/(docs)/devtools.mdx +1 -0
- package/.docs/raw/docs/(docs)/index.mdx +1 -0
- package/.docs/raw/docs/(docs)/installation.mdx +1 -0
- package/.docs/raw/docs/(docs)/rtl.mdx +80 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +34 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback-speech.mdx +41 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +26 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +34 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +31 -0
- package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +26 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +72 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +41 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +48 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +30 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +23 -0
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +21 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +7 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +149 -40
- package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +65 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +2 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +50 -6
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +15 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +36 -1
- package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +38 -0
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +9 -0
- package/.docs/raw/docs/(reference)/migrations/v0-14.mdx +144 -6
- package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +231 -3
- package/.docs/raw/docs/cloud/ai-sdk.mdx +221 -3
- package/.docs/raw/docs/cloud/langgraph.mdx +274 -2
- package/.docs/raw/docs/{(docs)/guides → guides}/attachments.mdx +41 -36
- package/.docs/raw/docs/guides/branching.mdx +76 -0
- package/.docs/raw/docs/guides/chain-of-thought.mdx +166 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/context-api.mdx +50 -22
- package/.docs/raw/docs/{(docs)/guides → guides}/dictation.mdx +2 -0
- package/.docs/raw/docs/guides/editing.mdx +102 -0
- package/.docs/raw/docs/guides/index.mdx +103 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/interactables.mdx +49 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/latex.mdx +51 -8
- package/.docs/raw/docs/guides/mentions.mdx +520 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/message-timing.mdx +8 -2
- package/.docs/raw/docs/{(docs)/guides → guides}/multi-agent.mdx +64 -4
- package/.docs/raw/docs/{(docs)/guides → guides}/quoting.mdx +10 -17
- package/.docs/raw/docs/guides/slash-commands.mdx +361 -0
- package/.docs/raw/docs/guides/speech.mdx +156 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/suggestions.mdx +21 -83
- package/.docs/raw/docs/{(docs)/guides → guides}/tool-ui.mdx +108 -36
- package/.docs/raw/docs/{(docs)/guides → guides}/tools.mdx +131 -35
- package/.docs/raw/docs/{(docs)/guides → guides}/voice.mdx +39 -0
- package/.docs/raw/docs/ink/index.mdx +1 -3
- package/.docs/raw/docs/ink/migration.mdx +1 -3
- package/.docs/raw/docs/ink/primitives.mdx +37 -1
- package/.docs/raw/docs/integrations/attachments/custom-adapter.mdx +520 -0
- package/.docs/raw/docs/integrations/auth/better-auth.mdx +191 -0
- package/.docs/raw/docs/integrations/auth/clerk.mdx +172 -0
- package/.docs/raw/docs/integrations/auth/next-auth.mdx +196 -0
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +79 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/full-stack.mdx +188 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +57 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +201 -0
- package/.docs/raw/docs/integrations/gateways/index.mdx +157 -0
- package/.docs/raw/docs/integrations/index.mdx +173 -0
- package/.docs/raw/docs/integrations/observability/helicone.mdx +130 -0
- package/.docs/raw/docs/integrations/observability/langfuse.mdx +156 -0
- package/.docs/raw/docs/integrations/observability/langsmith.mdx +146 -0
- package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +712 -0
- package/.docs/raw/docs/integrations/tools/mcp.mdx +267 -0
- package/.docs/raw/docs/primitives/action-bar.mdx +1 -0
- package/.docs/raw/docs/primitives/assistant-modal.mdx +1 -0
- package/.docs/raw/docs/primitives/attachment.mdx +1 -0
- package/.docs/raw/docs/primitives/branch-picker.mdx +1 -0
- package/.docs/raw/docs/primitives/chain-of-thought.mdx +90 -85
- package/.docs/raw/docs/primitives/composer.mdx +96 -63
- package/.docs/raw/docs/primitives/error.mdx +1 -0
- package/.docs/raw/docs/primitives/index.mdx +2 -1
- package/.docs/raw/docs/primitives/message.mdx +68 -5
- package/.docs/raw/docs/primitives/selection-toolbar.mdx +1 -0
- package/.docs/raw/docs/primitives/suggestion.mdx +1 -0
- package/.docs/raw/docs/primitives/thread-list.mdx +39 -0
- package/.docs/raw/docs/primitives/thread.mdx +16 -13
- package/.docs/raw/docs/react-native/index.mdx +1 -3
- package/.docs/raw/docs/react-native/migration.mdx +1 -3
- package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +396 -0
- package/.docs/raw/docs/runtimes/a2a/overview.mdx +60 -0
- package/.docs/raw/docs/runtimes/a2a/quickstart.mdx +216 -0
- package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +70 -0
- package/.docs/raw/docs/runtimes/ag-ui/quickstart.mdx +243 -0
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +123 -0
- package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +52 -0
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +71 -131
- package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +69 -63
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +365 -101
- package/.docs/raw/docs/runtimes/concepts/adapters.mdx +265 -0
- package/.docs/raw/docs/runtimes/concepts/architecture.mdx +125 -0
- package/.docs/raw/docs/runtimes/concepts/stability.mdx +67 -0
- package/.docs/raw/docs/runtimes/concepts/threads.mdx +428 -0
- package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +703 -0
- package/.docs/raw/docs/runtimes/custom/data-stream.mdx +323 -0
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +253 -1236
- package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +746 -0
- package/.docs/raw/docs/runtimes/custom/overview.mdx +71 -0
- package/.docs/raw/docs/runtimes/google-adk/api.mdx +256 -0
- package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +717 -0
- package/.docs/raw/docs/runtimes/google-adk/overview.mdx +69 -0
- package/.docs/raw/docs/runtimes/google-adk/quickstart.mdx +229 -0
- package/.docs/raw/docs/runtimes/langchain.mdx +533 -0
- package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +305 -0
- package/.docs/raw/docs/runtimes/langgraph/interrupts.mdx +104 -0
- package/.docs/raw/docs/runtimes/langgraph/overview.mdx +84 -0
- package/.docs/raw/docs/runtimes/langgraph/quickstart.mdx +496 -0
- package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +127 -0
- package/.docs/raw/docs/runtimes/langgraph/threads.mdx +113 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +3 -3
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +0 -23
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +1 -1
- package/.docs/raw/docs/runtimes/opencode/hooks.mdx +191 -0
- package/.docs/raw/docs/runtimes/opencode/overview.mdx +48 -0
- package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +119 -0
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +74 -198
- package/.docs/raw/docs/ui/accordion.mdx +1 -0
- package/.docs/raw/docs/ui/assistant-modal.mdx +1 -0
- package/.docs/raw/docs/ui/assistant-sidebar.mdx +1 -0
- package/.docs/raw/docs/ui/attachment.mdx +1 -0
- package/.docs/raw/docs/ui/badge.mdx +1 -0
- package/.docs/raw/docs/ui/composer-trigger-popover.mdx +200 -0
- package/.docs/raw/docs/ui/context-display.mdx +1 -0
- package/.docs/raw/docs/ui/diff-viewer.mdx +1 -0
- package/.docs/raw/docs/ui/directive-text.mdx +114 -0
- package/.docs/raw/docs/ui/file.mdx +1 -0
- package/.docs/raw/docs/ui/image.mdx +1 -0
- package/.docs/raw/docs/ui/markdown.mdx +2 -14
- package/.docs/raw/docs/ui/mermaid.mdx +1 -0
- package/.docs/raw/docs/ui/message-timing.mdx +3 -2
- package/.docs/raw/docs/ui/model-selector.mdx +1 -0
- package/.docs/raw/docs/ui/part-grouping.mdx +325 -313
- package/.docs/raw/docs/ui/quote.mdx +1 -0
- package/.docs/raw/docs/ui/reasoning.mdx +69 -32
- package/.docs/raw/docs/ui/scrollbar.mdx +1 -0
- package/.docs/raw/docs/ui/select.mdx +1 -0
- package/.docs/raw/docs/ui/sources.mdx +1 -0
- package/.docs/raw/docs/ui/streamdown.mdx +1 -0
- package/.docs/raw/docs/ui/syntax-highlighting.mdx +1 -0
- package/.docs/raw/docs/ui/tabs.mdx +1 -0
- package/.docs/raw/docs/ui/thread-list.mdx +17 -0
- package/.docs/raw/docs/ui/thread.mdx +56 -1
- package/.docs/raw/docs/ui/tool-fallback.mdx +1 -0
- package/.docs/raw/docs/ui/tool-group.mdx +39 -11
- package/.docs/raw/docs/ui/voice.mdx +1 -0
- package/.docs/raw/docs/utilities/heat-graph.mdx +1 -0
- package/.docs/raw/docs/utilities/react-o11y.mdx +278 -0
- package/.docs/raw/docs/utilities/tw-shimmer.mdx +1 -0
- package/dist/utils/logger.js +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/package.json +4 -4
- package/src/tools/tests/path-traversal.test.ts +1 -1
- package/src/utils/logger.ts +1 -1
- package/.docs/raw/docs/(docs)/guides/branching.mdx +0 -65
- package/.docs/raw/docs/(docs)/guides/chain-of-thought.mdx +0 -164
- package/.docs/raw/docs/(docs)/guides/editing.mdx +0 -66
- package/.docs/raw/docs/(docs)/guides/mentions.mdx +0 -406
- package/.docs/raw/docs/(docs)/guides/slash-commands.mdx +0 -275
- package/.docs/raw/docs/(docs)/guides/speech.mdx +0 -38
- package/.docs/raw/docs/runtimes/a2a/index.mdx +0 -298
- package/.docs/raw/docs/runtimes/assistant-transport.mdx +0 -1033
- package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +0 -268
- package/.docs/raw/docs/runtimes/custom/local.mdx +0 -1464
- package/.docs/raw/docs/runtimes/data-stream.mdx +0 -422
- package/.docs/raw/docs/runtimes/google-adk/index.mdx +0 -686
- package/.docs/raw/docs/runtimes/helicone.mdx +0 -61
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +0 -607
- package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +0 -12
- package/.docs/raw/docs/runtimes/langserve.mdx +0 -116
- package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +0 -218
- package/.docs/raw/docs/runtimes/mastra/overview.mdx +0 -18
- package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +0 -217
- package/.docs/raw/docs/ui/mention.mdx +0 -168
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
## app/api/chat/route.ts
|
|
4
4
|
|
|
5
5
|
```typescript
|
|
6
|
-
import {
|
|
6
|
+
import { createOpenAI } from "@ai-sdk/openai";
|
|
7
7
|
import { frontendTools } from "@assistant-ui/react-ai-sdk";
|
|
8
8
|
import { convertToModelMessages, streamText } from "ai";
|
|
9
9
|
|
|
10
10
|
export const maxDuration = 30;
|
|
11
11
|
|
|
12
|
+
const openai = createOpenAI({
|
|
13
|
+
...(process.env.OPENAI_BASE_URL && { baseURL: process.env.OPENAI_BASE_URL }),
|
|
14
|
+
...(process.env.OPENAI_API_KEY && { apiKey: process.env.OPENAI_API_KEY }),
|
|
15
|
+
});
|
|
16
|
+
|
|
12
17
|
export async function POST(req: Request) {
|
|
13
18
|
const { messages, system, tools } = await req.json();
|
|
14
19
|
|
|
@@ -37,6 +42,8 @@ export async function POST(req: Request) {
|
|
|
37
42
|
@custom-variant dark (&:is(.dark *));
|
|
38
43
|
|
|
39
44
|
@theme inline {
|
|
45
|
+
--font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;
|
|
46
|
+
--font-mono: var(--font-geist-mono), ui-monospace, monospace;
|
|
40
47
|
--radius-sm: calc(var(--radius) - 4px);
|
|
41
48
|
--radius-md: calc(var(--radius) - 2px);
|
|
42
49
|
--radius-lg: var(--radius);
|
|
@@ -159,11 +166,18 @@ export async function POST(req: Request) {
|
|
|
159
166
|
```tsx
|
|
160
167
|
import "./globals.css";
|
|
161
168
|
|
|
162
|
-
import {
|
|
163
|
-
import { Montserrat } from "next/font/google";
|
|
169
|
+
import { Geist, Geist_Mono } from "next/font/google";
|
|
164
170
|
import { MyRuntimeProvider } from "./MyRuntimeProvider";
|
|
165
171
|
|
|
166
|
-
const
|
|
172
|
+
const geistSans = Geist({
|
|
173
|
+
variable: "--font-geist-sans",
|
|
174
|
+
subsets: ["latin"],
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
const geistMono = Geist_Mono({
|
|
178
|
+
variable: "--font-geist-mono",
|
|
179
|
+
subsets: ["latin"],
|
|
180
|
+
});
|
|
167
181
|
|
|
168
182
|
export default function RootLayout({
|
|
169
183
|
children,
|
|
@@ -173,7 +187,11 @@ export default function RootLayout({
|
|
|
173
187
|
return (
|
|
174
188
|
<MyRuntimeProvider>
|
|
175
189
|
<html lang="en">
|
|
176
|
-
<body
|
|
190
|
+
<body
|
|
191
|
+
className={`${geistSans.variable} ${geistMono.variable} h-dvh font-sans antialiased`}
|
|
192
|
+
>
|
|
193
|
+
{children}
|
|
194
|
+
</body>
|
|
177
195
|
</html>
|
|
178
196
|
</MyRuntimeProvider>
|
|
179
197
|
);
|
|
@@ -211,8 +229,13 @@ export function MyRuntimeProvider({
|
|
|
211
229
|
"use client";
|
|
212
230
|
|
|
213
231
|
import { SignupForm } from "@/components/SignupForm";
|
|
214
|
-
import {
|
|
232
|
+
import { Thread } from "@/components/assistant-ui/thread";
|
|
215
233
|
import { Form } from "@/components/ui/form";
|
|
234
|
+
import {
|
|
235
|
+
ResizableHandle,
|
|
236
|
+
ResizablePanel,
|
|
237
|
+
ResizablePanelGroup,
|
|
238
|
+
} from "@/components/ui/resizable";
|
|
216
239
|
import { useAssistantForm } from "@assistant-ui/react-hook-form";
|
|
217
240
|
import {
|
|
218
241
|
useAssistantInstructions,
|
|
@@ -220,7 +243,6 @@ import {
|
|
|
220
243
|
AuiProvider,
|
|
221
244
|
Suggestions,
|
|
222
245
|
} from "@assistant-ui/react";
|
|
223
|
-
import Link from "next/link";
|
|
224
246
|
|
|
225
247
|
const SetFormFieldTool = () => {
|
|
226
248
|
return (
|
|
@@ -238,6 +260,8 @@ const SubmitFormTool = () => {
|
|
|
238
260
|
);
|
|
239
261
|
};
|
|
240
262
|
|
|
263
|
+
const panelStyle = { overflow: "hidden" } as const;
|
|
264
|
+
|
|
241
265
|
export default function Home() {
|
|
242
266
|
useAssistantInstructions("Help users sign up for Simon's hackathon.");
|
|
243
267
|
const form = useAssistantForm({
|
|
@@ -279,34 +303,33 @@ export default function Home() {
|
|
|
279
303
|
|
|
280
304
|
return (
|
|
281
305
|
<AuiProvider value={aui}>
|
|
282
|
-
<
|
|
283
|
-
<
|
|
284
|
-
<
|
|
285
|
-
<
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
>
|
|
299
|
-
|
|
300
|
-
</
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
</AssistantSidebar>
|
|
306
|
+
<ResizablePanelGroup orientation="horizontal">
|
|
307
|
+
<ResizablePanel defaultSize={60} minSize={40} style={panelStyle}>
|
|
308
|
+
<div className="h-full overflow-y-auto bg-muted/30">
|
|
309
|
+
<main className="mx-auto w-full max-w-2xl px-4 py-10 sm:px-6 sm:py-12">
|
|
310
|
+
<header className="mb-8 space-y-2">
|
|
311
|
+
<p className="font-medium text-muted-foreground text-sm uppercase tracking-wide">
|
|
312
|
+
Simon's Hackathon
|
|
313
|
+
</p>
|
|
314
|
+
<h1 className="font-semibold text-3xl tracking-tight">
|
|
315
|
+
Apply to join
|
|
316
|
+
</h1>
|
|
317
|
+
<p className="text-muted-foreground">
|
|
318
|
+
A weekend hackathon on AI UX. Be the first to get an invite.
|
|
319
|
+
</p>
|
|
320
|
+
</header>
|
|
321
|
+
|
|
322
|
+
<Form {...form}>
|
|
323
|
+
<SignupForm />
|
|
324
|
+
</Form>
|
|
325
|
+
</main>
|
|
326
|
+
</div>
|
|
327
|
+
</ResizablePanel>
|
|
328
|
+
<ResizableHandle />
|
|
329
|
+
<ResizablePanel defaultSize={40} minSize={30} style={panelStyle}>
|
|
330
|
+
<Thread />
|
|
331
|
+
</ResizablePanel>
|
|
332
|
+
</ResizablePanelGroup>
|
|
310
333
|
</AuiProvider>
|
|
311
334
|
);
|
|
312
335
|
}
|
|
@@ -347,7 +370,16 @@ export default function Home() {
|
|
|
347
370
|
|
|
348
371
|
```tsx
|
|
349
372
|
"use client";
|
|
373
|
+
|
|
350
374
|
import { Button } from "@/components/ui/button";
|
|
375
|
+
import {
|
|
376
|
+
Card,
|
|
377
|
+
CardContent,
|
|
378
|
+
CardDescription,
|
|
379
|
+
CardFooter,
|
|
380
|
+
CardHeader,
|
|
381
|
+
CardTitle,
|
|
382
|
+
} from "@/components/ui/card";
|
|
351
383
|
import {
|
|
352
384
|
FormControl,
|
|
353
385
|
FormDescription,
|
|
@@ -357,6 +389,9 @@ import {
|
|
|
357
389
|
FormMessage,
|
|
358
390
|
} from "@/components/ui/form";
|
|
359
391
|
import { Input } from "@/components/ui/input";
|
|
392
|
+
import { Separator } from "@/components/ui/separator";
|
|
393
|
+
import { Textarea } from "@/components/ui/textarea";
|
|
394
|
+
import { CheckCircle2, Loader2 } from "lucide-react";
|
|
360
395
|
import { type FC, useState } from "react";
|
|
361
396
|
import { useFormContext } from "react-hook-form";
|
|
362
397
|
import { submitSignup } from "../lib/submitSignup";
|
|
@@ -377,115 +412,152 @@ export const SignupForm: FC = () => {
|
|
|
377
412
|
}
|
|
378
413
|
};
|
|
379
414
|
|
|
380
|
-
if (
|
|
381
|
-
return <p className="my-4 font-bold text-green-600">Submitting...</p>;
|
|
382
|
-
|
|
383
|
-
if (isSubmitted)
|
|
415
|
+
if (isSubmitted) {
|
|
384
416
|
return (
|
|
385
|
-
<
|
|
386
|
-
|
|
387
|
-
|
|
417
|
+
<Card>
|
|
418
|
+
<CardContent className="flex flex-col items-center gap-3 py-10 text-center">
|
|
419
|
+
<CheckCircle2 className="size-10 text-green-600" />
|
|
420
|
+
<p className="font-semibold text-lg">You're signed up!</p>
|
|
421
|
+
<p className="text-muted-foreground text-sm">
|
|
422
|
+
Thanks for registering. You'll hear from us soon.
|
|
423
|
+
</p>
|
|
424
|
+
</CardContent>
|
|
425
|
+
</Card>
|
|
388
426
|
);
|
|
427
|
+
}
|
|
389
428
|
|
|
390
429
|
return (
|
|
391
|
-
<form onSubmit={form.handleSubmit(onSubmit)}
|
|
430
|
+
<form onSubmit={form.handleSubmit(onSubmit)}>
|
|
392
431
|
<input type="hidden" {...form.register("hidden")} />
|
|
393
432
|
|
|
394
|
-
<
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
<
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
<
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
433
|
+
<Card>
|
|
434
|
+
<CardHeader>
|
|
435
|
+
<CardTitle>Personal information</CardTitle>
|
|
436
|
+
<CardDescription>Tell us a bit about yourself.</CardDescription>
|
|
437
|
+
</CardHeader>
|
|
438
|
+
<CardContent className="space-y-4">
|
|
439
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
440
|
+
<FormField
|
|
441
|
+
control={form.control}
|
|
442
|
+
name="firstName"
|
|
443
|
+
render={({ field }) => (
|
|
444
|
+
<FormItem>
|
|
445
|
+
<FormLabel>First name</FormLabel>
|
|
446
|
+
<FormControl>
|
|
447
|
+
<Input placeholder="Jane" {...field} />
|
|
448
|
+
</FormControl>
|
|
449
|
+
<FormMessage />
|
|
450
|
+
</FormItem>
|
|
451
|
+
)}
|
|
452
|
+
/>
|
|
453
|
+
|
|
454
|
+
<FormField
|
|
455
|
+
control={form.control}
|
|
456
|
+
name="lastName"
|
|
457
|
+
render={({ field }) => (
|
|
458
|
+
<FormItem>
|
|
459
|
+
<FormLabel>Last name</FormLabel>
|
|
460
|
+
<FormControl>
|
|
461
|
+
<Input placeholder="Doe" {...field} />
|
|
462
|
+
</FormControl>
|
|
463
|
+
<FormMessage />
|
|
464
|
+
</FormItem>
|
|
465
|
+
)}
|
|
466
|
+
/>
|
|
467
|
+
</div>
|
|
468
|
+
|
|
469
|
+
<FormField
|
|
470
|
+
control={form.control}
|
|
471
|
+
name="email"
|
|
472
|
+
render={({ field }) => (
|
|
473
|
+
<FormItem>
|
|
474
|
+
<FormLabel>Email</FormLabel>
|
|
475
|
+
<FormControl>
|
|
476
|
+
<Input
|
|
477
|
+
type="email"
|
|
478
|
+
placeholder="jane@example.com"
|
|
479
|
+
{...field}
|
|
480
|
+
/>
|
|
481
|
+
</FormControl>
|
|
482
|
+
<FormMessage />
|
|
483
|
+
</FormItem>
|
|
484
|
+
)}
|
|
485
|
+
/>
|
|
486
|
+
|
|
487
|
+
<FormField
|
|
488
|
+
control={form.control}
|
|
489
|
+
name="cityAndCountry"
|
|
490
|
+
render={({ field }) => (
|
|
491
|
+
<FormItem>
|
|
492
|
+
<FormLabel>City and country</FormLabel>
|
|
493
|
+
<FormControl>
|
|
494
|
+
<Input placeholder="San Francisco, USA" {...field} />
|
|
495
|
+
</FormControl>
|
|
496
|
+
<FormMessage />
|
|
497
|
+
</FormItem>
|
|
498
|
+
)}
|
|
499
|
+
/>
|
|
500
|
+
</CardContent>
|
|
501
|
+
|
|
502
|
+
<Separator />
|
|
503
|
+
|
|
504
|
+
<CardHeader>
|
|
505
|
+
<CardTitle>Your project</CardTitle>
|
|
506
|
+
<CardDescription>
|
|
507
|
+
Share what you'd like to build at the hackathon.
|
|
508
|
+
</CardDescription>
|
|
509
|
+
</CardHeader>
|
|
510
|
+
<CardContent className="space-y-4">
|
|
511
|
+
<FormField
|
|
512
|
+
control={form.control}
|
|
513
|
+
name="projectIdea"
|
|
514
|
+
render={({ field }) => (
|
|
515
|
+
<FormItem>
|
|
516
|
+
<FormLabel>Project idea</FormLabel>
|
|
517
|
+
<FormControl>
|
|
518
|
+
<Textarea
|
|
519
|
+
placeholder="A multiplayer drawing game powered by AI..."
|
|
520
|
+
className="min-h-24"
|
|
521
|
+
{...field}
|
|
522
|
+
/>
|
|
523
|
+
</FormControl>
|
|
524
|
+
<FormDescription>
|
|
525
|
+
A short pitch is fine. Leave blank if you're still
|
|
526
|
+
brainstorming.
|
|
527
|
+
</FormDescription>
|
|
528
|
+
<FormMessage />
|
|
529
|
+
</FormItem>
|
|
530
|
+
)}
|
|
531
|
+
/>
|
|
532
|
+
|
|
533
|
+
<FormField
|
|
534
|
+
control={form.control}
|
|
535
|
+
name="proficientTechnologies"
|
|
536
|
+
render={({ field }) => (
|
|
537
|
+
<FormItem>
|
|
538
|
+
<FormLabel>Technologies</FormLabel>
|
|
539
|
+
<FormControl>
|
|
540
|
+
<Input
|
|
541
|
+
placeholder="Next.js, Tailwind CSS, Postgres"
|
|
542
|
+
{...field}
|
|
543
|
+
/>
|
|
544
|
+
</FormControl>
|
|
545
|
+
<FormDescription>
|
|
546
|
+
Comma-separated list of what you're comfortable with.
|
|
547
|
+
</FormDescription>
|
|
548
|
+
<FormMessage />
|
|
549
|
+
</FormItem>
|
|
550
|
+
)}
|
|
551
|
+
/>
|
|
552
|
+
</CardContent>
|
|
553
|
+
|
|
554
|
+
<CardFooter className="sticky bottom-0 justify-end gap-3 border-t bg-card/95 backdrop-blur supports-[backdrop-filter]:bg-card/75">
|
|
555
|
+
<Button type="submit" disabled={isSubmitting}>
|
|
556
|
+
{isSubmitting && <Loader2 className="size-4 animate-spin" />}
|
|
557
|
+
{isSubmitting ? "Submitting..." : "Submit"}
|
|
558
|
+
</Button>
|
|
559
|
+
</CardFooter>
|
|
560
|
+
</Card>
|
|
489
561
|
</form>
|
|
490
562
|
);
|
|
491
563
|
};
|
|
@@ -498,7 +570,7 @@ export const SignupForm: FC = () => {
|
|
|
498
570
|
"use server";
|
|
499
571
|
|
|
500
572
|
export const submitSignup = async (data: object) => {
|
|
501
|
-
const res = await fetch(process.env
|
|
573
|
+
const res = await fetch(process.env.ASSISTANT_UI_SUBMIT_SIGNUP_ENDPOINT!, {
|
|
502
574
|
method: "POST",
|
|
503
575
|
headers: {
|
|
504
576
|
"Content-Type": "application/json",
|
|
@@ -537,32 +609,32 @@ export default nextConfig;
|
|
|
537
609
|
"start": "next start"
|
|
538
610
|
},
|
|
539
611
|
"dependencies": {
|
|
540
|
-
"@ai-sdk/openai": "^3.0.
|
|
612
|
+
"@ai-sdk/openai": "^3.0.61",
|
|
541
613
|
"@assistant-ui/react": "workspace:*",
|
|
542
614
|
"@assistant-ui/react-ai-sdk": "workspace:*",
|
|
543
615
|
"@assistant-ui/react-hook-form": "workspace:*",
|
|
544
616
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
545
617
|
"@assistant-ui/ui": "workspace:*",
|
|
546
|
-
"ai": "^6.0.
|
|
618
|
+
"ai": "^6.0.175",
|
|
547
619
|
"class-variance-authority": "^0.7.1",
|
|
548
620
|
"clsx": "^2.1.1",
|
|
549
|
-
"lucide-react": "^1.
|
|
550
|
-
"next": "^16.2.
|
|
621
|
+
"lucide-react": "^1.14.0",
|
|
622
|
+
"next": "^16.2.4",
|
|
551
623
|
"react": "^19.2.5",
|
|
552
624
|
"react-dom": "^19.2.5",
|
|
553
|
-
"react-hook-form": "^7.
|
|
625
|
+
"react-hook-form": "^7.75.0",
|
|
554
626
|
"tailwind-merge": "^3.5.0"
|
|
555
627
|
},
|
|
556
628
|
"devDependencies": {
|
|
557
629
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
558
|
-
"@tailwindcss/postcss": "^4.2.
|
|
630
|
+
"@tailwindcss/postcss": "^4.2.4",
|
|
559
631
|
"@types/node": "^25.6.0",
|
|
560
632
|
"@types/react": "^19.2.14",
|
|
561
633
|
"@types/react-dom": "^19.2.3",
|
|
562
|
-
"postcss": "^8.5.
|
|
563
|
-
"tailwindcss": "^4.2.
|
|
634
|
+
"postcss": "^8.5.14",
|
|
635
|
+
"tailwindcss": "^4.2.4",
|
|
564
636
|
"tw-animate-css": "^1.4.0",
|
|
565
|
-
"typescript": "^6.0.
|
|
637
|
+
"typescript": "^6.0.3"
|
|
566
638
|
}
|
|
567
639
|
}
|
|
568
640
|
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@assistant-ui/react-ink": "workspace:*",
|
|
18
18
|
"@assistant-ui/react-ink-markdown": "workspace:*",
|
|
19
|
-
"ink": "^7.0.
|
|
19
|
+
"ink": "^7.0.2",
|
|
20
20
|
"react": "^19.2.5"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/react": "^19.2.14",
|
|
24
24
|
"esbuild": "^0.28.0",
|
|
25
25
|
"tsx": "^4.21.0",
|
|
26
|
-
"typescript": "^6.0.
|
|
26
|
+
"typescript": "^6.0.3"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -772,30 +772,30 @@ export default function Home() {
|
|
|
772
772
|
"dependencies": {
|
|
773
773
|
"@assistant-ui/react": "workspace:*",
|
|
774
774
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
775
|
-
"@react-router/node": "^7.
|
|
776
|
-
"@react-router/serve": "^7.
|
|
775
|
+
"@react-router/node": "^7.15.0",
|
|
776
|
+
"@react-router/serve": "^7.15.0",
|
|
777
777
|
"class-variance-authority": "^0.7.1",
|
|
778
778
|
"clsx": "^2.1.1",
|
|
779
|
-
"eventsource-parser": "^3.0.
|
|
780
|
-
"isbot": "^5.1.
|
|
781
|
-
"lucide-react": "^1.
|
|
782
|
-
"openai": "^6.
|
|
779
|
+
"eventsource-parser": "^3.0.8",
|
|
780
|
+
"isbot": "^5.1.40",
|
|
781
|
+
"lucide-react": "^1.14.0",
|
|
782
|
+
"openai": "^6.36.0",
|
|
783
783
|
"react": "^19.2.5",
|
|
784
784
|
"react-dom": "^19.2.5",
|
|
785
|
-
"react-router": "^7.
|
|
785
|
+
"react-router": "^7.15.0",
|
|
786
786
|
"remark-gfm": "^4.0.1",
|
|
787
787
|
"tailwind-merge": "^3.5.0"
|
|
788
788
|
},
|
|
789
789
|
"devDependencies": {
|
|
790
|
-
"@react-router/dev": "^7.
|
|
791
|
-
"@tailwindcss/vite": "^4.2.
|
|
790
|
+
"@react-router/dev": "^7.15.0",
|
|
791
|
+
"@tailwindcss/vite": "^4.2.4",
|
|
792
792
|
"@types/node": "^25.6.0",
|
|
793
793
|
"@types/react": "^19.2.14",
|
|
794
794
|
"@types/react-dom": "^19.2.3",
|
|
795
|
-
"tailwindcss": "^4.2.
|
|
795
|
+
"tailwindcss": "^4.2.4",
|
|
796
796
|
"tw-animate-css": "^1.4.0",
|
|
797
|
-
"typescript": "^6.0.
|
|
798
|
-
"vite": "^8.0.
|
|
797
|
+
"typescript": "^6.0.3",
|
|
798
|
+
"vite": "^8.0.10",
|
|
799
799
|
"vite-tsconfig-paths": "^6.1.1"
|
|
800
800
|
}
|
|
801
801
|
}
|
|
@@ -149,12 +149,14 @@ const Foo = () => {
|
|
|
149
149
|
</div>
|
|
150
150
|
<div className="mt-2 flex gap-2">
|
|
151
151
|
<button
|
|
152
|
+
type="button"
|
|
152
153
|
onClick={handleUpdate}
|
|
153
154
|
className="flex-1 rounded-md bg-blue-600 px-4 py-2 font-medium text-white transition-colors hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800"
|
|
154
155
|
>
|
|
155
156
|
Update
|
|
156
157
|
</button>
|
|
157
158
|
<button
|
|
159
|
+
type="button"
|
|
158
160
|
onClick={() => aui.foo().remove()}
|
|
159
161
|
className="rounded-md bg-red-600 px-4 py-2 font-medium text-white transition-colors hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800"
|
|
160
162
|
>
|
|
@@ -179,6 +181,7 @@ const AddFooButton = () => {
|
|
|
179
181
|
const aui = useAui();
|
|
180
182
|
return (
|
|
181
183
|
<button
|
|
184
|
+
type="button"
|
|
182
185
|
onClick={() => aui.fooList().addFoo()}
|
|
183
186
|
className="rounded-md bg-green-600 px-4 py-2 font-medium text-white transition-colors hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800"
|
|
184
187
|
>
|
|
@@ -488,20 +491,20 @@ export default nextConfig;
|
|
|
488
491
|
"dependencies": {
|
|
489
492
|
"@assistant-ui/store": "workspace:*",
|
|
490
493
|
"@assistant-ui/tap": "workspace:*",
|
|
491
|
-
"next": "^16.2.
|
|
494
|
+
"next": "^16.2.4",
|
|
492
495
|
"react": "^19.2.5",
|
|
493
496
|
"react-dom": "^19.2.5"
|
|
494
497
|
},
|
|
495
498
|
"devDependencies": {
|
|
496
499
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
497
|
-
"@tailwindcss/postcss": "^4.2.
|
|
500
|
+
"@tailwindcss/postcss": "^4.2.4",
|
|
498
501
|
"@types/node": "^25.6.0",
|
|
499
502
|
"@types/react": "^19.2.14",
|
|
500
503
|
"@types/react-dom": "^19.2.3",
|
|
501
|
-
"postcss": "^8.5.
|
|
502
|
-
"tailwindcss": "^4.2.
|
|
504
|
+
"postcss": "^8.5.14",
|
|
505
|
+
"tailwindcss": "^4.2.4",
|
|
503
506
|
"tw-animate-css": "^1.4.0",
|
|
504
|
-
"typescript": "^6.0.
|
|
507
|
+
"typescript": "^6.0.3"
|
|
505
508
|
}
|
|
506
509
|
}
|
|
507
510
|
|
|
@@ -64,19 +64,19 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@assistant-ui/react": "workspace:*",
|
|
66
66
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
67
|
-
"@tailwindcss/vite": "^4.2.
|
|
68
|
-
"@tanstack/react-router": "^1.
|
|
69
|
-
"@tanstack/react-start": "^1.167.
|
|
67
|
+
"@tailwindcss/vite": "^4.2.4",
|
|
68
|
+
"@tanstack/react-router": "^1.169.2",
|
|
69
|
+
"@tanstack/react-start": "^1.167.64",
|
|
70
70
|
"class-variance-authority": "^0.7.1",
|
|
71
71
|
"clsx": "^2.1.1",
|
|
72
|
-
"lucide-react": "^1.
|
|
72
|
+
"lucide-react": "^1.14.0",
|
|
73
73
|
"nitro": "^3.0.260311-beta",
|
|
74
|
-
"openai": "^6.
|
|
74
|
+
"openai": "^6.36.0",
|
|
75
75
|
"react": "^19.2.5",
|
|
76
76
|
"react-dom": "^19.2.5",
|
|
77
77
|
"remark-gfm": "^4.0.1",
|
|
78
78
|
"tailwind-merge": "^3.5.0",
|
|
79
|
-
"tailwindcss": "^4.2.
|
|
79
|
+
"tailwindcss": "^4.2.4",
|
|
80
80
|
"vite-tsconfig-paths": "^6.1.1"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"@types/react": "^19.2.14",
|
|
86
86
|
"@types/react-dom": "^19.2.3",
|
|
87
87
|
"@vitejs/plugin-react": "^6.0.1",
|
|
88
|
-
"typescript": "^6.0.
|
|
89
|
-
"vite": "^8.0.
|
|
88
|
+
"typescript": "^6.0.3",
|
|
89
|
+
"vite": "^8.0.10"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -143,8 +143,8 @@ npm run dev
|
|
|
143
143
|
import { useState, type ReactNode } from "react";
|
|
144
144
|
import {
|
|
145
145
|
useExternalStoreRuntime,
|
|
146
|
-
ThreadMessageLike,
|
|
147
|
-
AppendMessage,
|
|
146
|
+
type ThreadMessageLike,
|
|
147
|
+
type AppendMessage,
|
|
148
148
|
AssistantRuntimeProvider,
|
|
149
149
|
} from "@assistant-ui/react";
|
|
150
150
|
import { chatStream } from "@/server/chat";
|