@assistant-ui/mcp-docs-server 0.1.31 → 0.1.33
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 +23 -25
- package/.docs/organized/code-examples/with-a2a.md +28 -28
- package/.docs/organized/code-examples/with-ag-ui.md +35 -30
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +16 -14
- package/.docs/organized/code-examples/with-artifacts.md +44 -38
- package/.docs/organized/code-examples/with-assistant-transport.md +68 -56
- package/.docs/organized/code-examples/with-browser-extension.md +357 -0
- package/.docs/organized/code-examples/with-chain-of-thought.md +425 -90
- package/.docs/organized/code-examples/with-cloud-standalone.md +30 -29
- package/.docs/organized/code-examples/with-cloud.md +16 -14
- package/.docs/organized/code-examples/with-custom-thread-list.md +19 -17
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +29 -26
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +20 -18
- package/.docs/organized/code-examples/with-expo.md +37 -31
- package/.docs/organized/code-examples/with-external-store.md +13 -11
- package/.docs/organized/code-examples/with-ffmpeg.md +327 -290
- package/.docs/organized/code-examples/with-generative-ui.md +1195 -194
- package/.docs/organized/code-examples/with-google-adk.md +13 -11
- package/.docs/organized/code-examples/with-heat-graph.md +16 -14
- package/.docs/organized/code-examples/with-image-generation.md +456 -0
- package/.docs/organized/code-examples/with-interactables.md +322 -244
- package/.docs/organized/code-examples/with-langchain.md +18 -16
- package/.docs/organized/code-examples/with-langgraph.md +95 -88
- package/.docs/organized/code-examples/with-livekit.md +30 -27
- package/.docs/organized/code-examples/with-mcp.md +754 -0
- package/.docs/organized/code-examples/with-opencode.md +70 -70
- package/.docs/organized/code-examples/with-react-hook-form.md +24 -22
- package/.docs/organized/code-examples/with-react-ink.md +4 -4
- package/.docs/organized/code-examples/with-react-router.md +20 -18
- package/.docs/organized/code-examples/with-resumable-stream.md +661 -0
- package/.docs/organized/code-examples/with-store.md +22 -20
- package/.docs/organized/code-examples/with-tanstack.md +18 -19
- package/.docs/organized/code-examples/with-tap-runtime.md +31 -28
- package/.docs/raw/docs/(docs)/architecture.mdx +43 -2
- package/.docs/raw/docs/(docs)/cli.mdx +2 -2
- package/.docs/raw/docs/(docs)/copilots/model-context.mdx +34 -26
- package/.docs/raw/docs/(docs)/copilots/motivation.mdx +32 -26
- package/.docs/raw/docs/(docs)/index.mdx +2 -2
- package/.docs/raw/docs/(docs)/installation.mdx +2 -2
- package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +26 -24
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +20 -12
- package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +44 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +41 -16
- package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +12 -23
- package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +37 -8
- package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +11 -9
- package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +64 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +52 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +46 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +18 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +33 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/spec.mdx +45 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +98 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +18 -13
- package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +31 -52
- package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +640 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +15 -28
- package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +64 -18
- package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +434 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +24 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +11 -12
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +109 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +58 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +109 -132
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +78 -221
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +127 -242
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +39 -20
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +66 -87
- package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +50 -58
- package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +80 -48
- package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +67 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +323 -461
- package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +36 -43
- package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +29 -24
- package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +63 -245
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +202 -588
- package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +65 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +35 -22
- package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +57 -140
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +70 -161
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +84 -108
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +77 -96
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +173 -349
- package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +9 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +10 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +15 -70
- package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +18 -13
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +25 -28
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +11 -63
- package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +11 -48
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +10 -47
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +18 -30
- package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +85 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +39 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +127 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +42 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +91 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +48 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +62 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +19 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +143 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +54 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +36 -0
- package/.docs/raw/docs/cloud/ai-sdk.mdx +1 -3
- package/.docs/raw/docs/cloud/index.mdx +2 -2
- package/.docs/raw/docs/guides/attachments.mdx +4 -4
- package/.docs/raw/docs/guides/branching.mdx +1 -1
- package/.docs/raw/docs/guides/chain-of-thought.mdx +12 -14
- package/.docs/raw/docs/guides/context-api.mdx +6 -5
- package/.docs/raw/docs/guides/dictation.mdx +2 -2
- package/.docs/raw/docs/guides/editing.mdx +1 -1
- package/.docs/raw/docs/guides/image-generation.mdx +74 -0
- package/.docs/raw/docs/guides/index.mdx +5 -14
- package/.docs/raw/docs/guides/latex.mdx +2 -2
- package/.docs/raw/docs/guides/mentions.mdx +6 -6
- package/.docs/raw/docs/guides/message-timing.mdx +38 -5
- package/.docs/raw/docs/guides/quoting.mdx +1 -1
- package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +212 -0
- package/.docs/raw/docs/guides/resumable-stream-stores.mdx +152 -0
- package/.docs/raw/docs/guides/resumable-streams.mdx +210 -0
- package/.docs/raw/docs/guides/slash-commands.mdx +2 -2
- package/.docs/raw/docs/guides/speech.mdx +2 -2
- package/.docs/raw/docs/guides/suggestions.mdx +89 -5
- package/.docs/raw/docs/guides/voice.mdx +2 -2
- package/.docs/raw/docs/ink/adapters.mdx +37 -1
- package/.docs/raw/docs/ink/custom-backend.mdx +59 -8
- package/.docs/raw/docs/ink/hooks.mdx +98 -85
- package/.docs/raw/docs/ink/index.mdx +10 -11
- package/.docs/raw/docs/ink/migration.mdx +1 -1
- package/.docs/raw/docs/ink/primitives.mdx +350 -9
- package/.docs/raw/docs/integrations/auth/better-auth.mdx +1 -1
- package/.docs/raw/docs/integrations/auth/clerk.mdx +1 -1
- package/.docs/raw/docs/integrations/auth/next-auth.mdx +1 -1
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +3 -3
- package/.docs/raw/docs/integrations/frameworks/cloudflare-agents/overview.mdx +282 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +2 -2
- package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +1 -1
- package/.docs/raw/docs/integrations/gateways/index.mdx +9 -4
- package/.docs/raw/docs/integrations/index.mdx +17 -5
- package/.docs/raw/docs/integrations/observability/langfuse.mdx +8 -1
- package/.docs/raw/docs/integrations/observability/langsmith.mdx +8 -4
- package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +17 -2
- package/.docs/raw/docs/migrations/toolkit-tools.mdx +226 -0
- package/.docs/raw/docs/primitives/chain-of-thought.mdx +10 -16
- package/.docs/raw/docs/primitives/composer.mdx +53 -0
- package/.docs/raw/docs/primitives/index.mdx +2 -2
- package/.docs/raw/docs/primitives/message.mdx +9 -10
- package/.docs/raw/docs/primitives/suggestion.mdx +9 -0
- package/.docs/raw/docs/react-native/hooks.mdx +57 -82
- package/.docs/raw/docs/react-native/index.mdx +4 -4
- package/.docs/raw/docs/react-native/migration.mdx +1 -1
- package/.docs/raw/docs/react-native/primitives.mdx +2 -2
- package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +7 -4
- package/.docs/raw/docs/runtimes/a2a/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +32 -1
- package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +7 -2
- package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +1 -1
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +129 -1
- package/.docs/raw/docs/runtimes/concepts/threads.mdx +7 -1
- package/.docs/raw/docs/runtimes/custom/data-stream.mdx +27 -2
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +9 -1
- package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +18 -7
- package/.docs/raw/docs/runtimes/custom/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +108 -38
- package/.docs/raw/docs/runtimes/google-adk/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/langchain.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +1 -1
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +64 -50
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +98 -86
- package/.docs/raw/docs/runtimes/opencode/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +1 -1
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +12 -5
- package/.docs/raw/docs/tools/backend.mdx +136 -0
- package/.docs/raw/docs/tools/defining-tools.mdx +413 -0
- package/.docs/raw/docs/tools/dynamic-tools.mdx +110 -0
- package/.docs/raw/docs/tools/generative-ui.mdx +214 -0
- package/.docs/raw/docs/tools/index.mdx +76 -0
- package/.docs/raw/docs/{guides → tools}/interactables.mdx +3 -3
- package/.docs/raw/docs/tools/mcp-apps.mdx +231 -0
- package/.docs/raw/docs/{integrations/tools → tools}/mcp.mdx +77 -50
- package/.docs/raw/docs/{guides → tools}/multi-agent.mdx +19 -21
- package/.docs/raw/docs/tools/tool-ui.mdx +967 -0
- package/.docs/raw/docs/tools/user-managed-mcp.mdx +337 -0
- package/.docs/raw/docs/ui/composer-trigger-popover.mdx +11 -1
- package/.docs/raw/docs/ui/directive-text.mdx +3 -3
- package/.docs/raw/docs/ui/mcp-config.mdx +102 -0
- package/.docs/raw/docs/ui/model-selector.mdx +8 -8
- package/.docs/raw/docs/ui/part-grouping.mdx +84 -50
- package/.docs/raw/docs/ui/reasoning.mdx +4 -5
- package/.docs/raw/docs/ui/sources.mdx +17 -0
- package/.docs/raw/docs/ui/streamdown.mdx +34 -2
- package/.docs/raw/docs/ui/thread-list.mdx +2 -2
- package/.docs/raw/docs/ui/thread.mdx +2 -2
- package/.docs/raw/docs/ui/tool-group.mdx +5 -6
- package/.docs/raw/docs/utilities/heat-graph.mdx +1 -1
- package/README.md +14 -72
- package/dist/constants.d.ts +12 -9
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +13 -9
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -24
- package/dist/index.js.map +1 -1
- package/dist/prepare-docs/code-examples.d.ts +4 -1
- package/dist/prepare-docs/code-examples.d.ts.map +1 -1
- package/dist/prepare-docs/code-examples.js +109 -121
- package/dist/prepare-docs/code-examples.js.map +1 -1
- package/dist/prepare-docs/copy-raw.d.ts +4 -1
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
- package/dist/prepare-docs/copy-raw.js +45 -42
- package/dist/prepare-docs/copy-raw.js.map +1 -1
- package/dist/prepare-docs/prepare.d.ts +1 -2
- package/dist/prepare-docs/prepare.js +17 -17
- package/dist/prepare-docs/prepare.js.map +1 -1
- package/dist/stdio.d.ts +1 -3
- package/dist/stdio.js +6 -3
- package/dist/stdio.js.map +1 -1
- package/dist/tools/docs.d.ts +20 -15
- package/dist/tools/docs.d.ts.map +1 -1
- package/dist/tools/docs.js +140 -161
- package/dist/tools/docs.js.map +1 -1
- package/dist/tools/examples.d.ts +20 -15
- package/dist/tools/examples.d.ts.map +1 -1
- package/dist/tools/examples.js +74 -86
- package/dist/tools/examples.js.map +1 -1
- package/dist/tools/tests/test-setup.d.ts +5 -2
- package/dist/tools/tests/test-setup.d.ts.map +1 -1
- package/dist/tools/tests/test-setup.js +21 -28
- package/dist/tools/tests/test-setup.js.map +1 -1
- package/dist/utils/logger.d.ts +8 -5
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +17 -17
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/mcp-format.d.ts +8 -5
- package/dist/utils/mcp-format.d.ts.map +1 -1
- package/dist/utils/mcp-format.js +9 -9
- package/dist/utils/mcp-format.js.map +1 -1
- package/dist/utils/mdx.d.ts +8 -6
- package/dist/utils/mdx.d.ts.map +1 -1
- package/dist/utils/mdx.js +22 -22
- package/dist/utils/mdx.js.map +1 -1
- package/dist/utils/paths.d.ts +9 -6
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +66 -76
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/security.d.ts +4 -1
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +19 -40
- package/dist/utils/security.js.map +1 -1
- package/package.json +5 -5
- package/.docs/organized/code-examples/with-parent-id-grouping.md +0 -596
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +0 -151
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +0 -230
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback-speech.mdx +0 -41
- package/.docs/raw/docs/(reference)/api-reference/context-providers/text-message-part-provider.mdx +0 -40
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -260
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-hook-form.mdx +0 -103
- package/.docs/raw/docs/(reference)/api-reference/integrations/vercel-ai-sdk.mdx +0 -254
- package/.docs/raw/docs/guides/tool-ui.mdx +0 -858
- package/.docs/raw/docs/guides/tools.mdx +0 -675
- package/dist/prepare-docs/prepare.d.ts.map +0 -1
- package/dist/stdio.d.ts.map +0 -1
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/deprecation-policy.mdx +0 -0
- /package/.docs/raw/docs/{(reference) → migrations}/react-compatibility.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/react-langgraph-v0-7.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-11.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-12.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-14.mdx +0 -0
|
@@ -268,15 +268,15 @@ export function TodosPanel() {
|
|
|
268
268
|
return (
|
|
269
269
|
<div className="text-muted-foreground text-sm">
|
|
270
270
|
Todos from the agent will appear here. This panel reads{" "}
|
|
271
|
-
<code className="
|
|
272
|
-
<code className="
|
|
271
|
+
<code className="bg-muted rounded px-1">state.todos</code> via{" "}
|
|
272
|
+
<code className="bg-muted rounded px-1">useLangChainState</code>.
|
|
273
273
|
</div>
|
|
274
274
|
);
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
return (
|
|
278
278
|
<div className="space-y-2">
|
|
279
|
-
<h2 className="
|
|
279
|
+
<h2 className="text-muted-foreground text-sm font-semibold tracking-wide uppercase">
|
|
280
280
|
Agent todos
|
|
281
281
|
</h2>
|
|
282
282
|
<ul className="space-y-1">
|
|
@@ -307,13 +307,14 @@ export function TodosPanel() {
|
|
|
307
307
|
## next.config.ts
|
|
308
308
|
|
|
309
309
|
```typescript
|
|
310
|
+
import { withAui } from "@assistant-ui/next";
|
|
310
311
|
import type { NextConfig } from "next";
|
|
311
312
|
|
|
312
313
|
const nextConfig: NextConfig = {
|
|
313
314
|
transpilePackages: ["@assistant-ui/react", "@assistant-ui/react-langchain"],
|
|
314
315
|
};
|
|
315
316
|
|
|
316
|
-
export default nextConfig;
|
|
317
|
+
export default withAui(nextConfig);
|
|
317
318
|
|
|
318
319
|
```
|
|
319
320
|
|
|
@@ -335,24 +336,25 @@ export default nextConfig;
|
|
|
335
336
|
"@assistant-ui/react-langchain": "workspace:*",
|
|
336
337
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
337
338
|
"@assistant-ui/ui": "workspace:*",
|
|
338
|
-
"@langchain/langgraph-sdk": "^1.9.
|
|
339
|
-
"@langchain/react": "^0.
|
|
339
|
+
"@langchain/langgraph-sdk": "^1.9.10",
|
|
340
|
+
"@langchain/react": "^1.0.10",
|
|
340
341
|
"class-variance-authority": "^0.7.1",
|
|
341
342
|
"clsx": "^2.1.1",
|
|
342
|
-
"lucide-react": "^1.
|
|
343
|
-
"next": "^16.2.
|
|
344
|
-
"react": "^19.2.
|
|
345
|
-
"react-dom": "^19.2.
|
|
346
|
-
"tailwind-merge": "^3.
|
|
343
|
+
"lucide-react": "^1.17.0",
|
|
344
|
+
"next": "^16.2.6",
|
|
345
|
+
"react": "^19.2.6",
|
|
346
|
+
"react-dom": "^19.2.6",
|
|
347
|
+
"tailwind-merge": "^3.6.0"
|
|
347
348
|
},
|
|
348
349
|
"devDependencies": {
|
|
350
|
+
"@assistant-ui/next": "workspace:*",
|
|
349
351
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
350
|
-
"@tailwindcss/postcss": "^4.
|
|
351
|
-
"@types/node": "^25.
|
|
352
|
-
"@types/react": "^19.2.
|
|
352
|
+
"@tailwindcss/postcss": "^4.3.0",
|
|
353
|
+
"@types/node": "^25.9.1",
|
|
354
|
+
"@types/react": "^19.2.15",
|
|
353
355
|
"@types/react-dom": "^19.2.3",
|
|
354
|
-
"postcss": "^8.5.
|
|
355
|
-
"tailwindcss": "^4.
|
|
356
|
+
"postcss": "^8.5.15",
|
|
357
|
+
"tailwindcss": "^4.3.0",
|
|
356
358
|
"tw-animate-css": "^1.4.0",
|
|
357
359
|
"typescript": "^6.0.3"
|
|
358
360
|
}
|
|
@@ -306,13 +306,31 @@ export function MyRuntimeProvider({
|
|
|
306
306
|
"use client";
|
|
307
307
|
|
|
308
308
|
import { Thread } from "@/components/assistant-ui/thread";
|
|
309
|
-
import {
|
|
310
|
-
import {
|
|
309
|
+
import { PriceSnapshotToolUI } from "@/components/tools/price-snapshot/PriceSnapshotTool";
|
|
310
|
+
import { PurchaseStockToolUI } from "@/components/tools/purchase-stock/PurchaseStockTool";
|
|
311
311
|
import { ThreadList } from "@/components/assistant-ui/thread-list";
|
|
312
|
-
import {
|
|
312
|
+
import {
|
|
313
|
+
useAui,
|
|
314
|
+
AuiProvider,
|
|
315
|
+
Suggestions,
|
|
316
|
+
Tools,
|
|
317
|
+
type Toolkit,
|
|
318
|
+
} from "@assistant-ui/react";
|
|
319
|
+
|
|
320
|
+
const toolkit = {
|
|
321
|
+
price_snapshot: {
|
|
322
|
+
type: "backend",
|
|
323
|
+
render: PriceSnapshotToolUI,
|
|
324
|
+
},
|
|
325
|
+
purchase_stock: {
|
|
326
|
+
type: "backend",
|
|
327
|
+
render: PurchaseStockToolUI,
|
|
328
|
+
},
|
|
329
|
+
} satisfies Toolkit;
|
|
313
330
|
|
|
314
331
|
function ThreadWithSuggestions() {
|
|
315
332
|
const aui = useAui({
|
|
333
|
+
tools: Tools({ toolkit }),
|
|
316
334
|
suggestions: Suggestions([
|
|
317
335
|
{
|
|
318
336
|
title: "Check stock price",
|
|
@@ -341,8 +359,6 @@ export default function Home() {
|
|
|
341
359
|
</div>
|
|
342
360
|
<div className="flex-grow">
|
|
343
361
|
<ThreadWithSuggestions />
|
|
344
|
-
<PriceSnapshotTool />
|
|
345
|
-
<PurchaseStockTool />
|
|
346
362
|
</div>
|
|
347
363
|
</div>
|
|
348
364
|
);
|
|
@@ -414,17 +430,17 @@ export function PriceSnapshot({
|
|
|
414
430
|
return (
|
|
415
431
|
<Card className="mx-auto w-full max-w-md">
|
|
416
432
|
<CardHeader>
|
|
417
|
-
<CardTitle className="font-bold
|
|
433
|
+
<CardTitle className="text-2xl font-bold">{ticker}</CardTitle>
|
|
418
434
|
</CardHeader>
|
|
419
435
|
<CardContent>
|
|
420
436
|
<div className="grid grid-cols-2 gap-4">
|
|
421
437
|
<div className="col-span-2">
|
|
422
|
-
<p className="font-semibold
|
|
438
|
+
<p className="text-3xl font-semibold">${price?.toFixed(2)}</p>
|
|
423
439
|
</div>
|
|
424
440
|
<div>
|
|
425
441
|
<p className="text-muted-foreground text-sm">Day Change</p>
|
|
426
442
|
<p
|
|
427
|
-
className={`flex items-center font-medium
|
|
443
|
+
className={`flex items-center text-lg font-medium ${changeColor}`}
|
|
428
444
|
>
|
|
429
445
|
<ArrowIcon className="mr-1 h-4 w-4" />$
|
|
430
446
|
{Math.abs(day_change)?.toFixed(2)} (
|
|
@@ -433,7 +449,7 @@ export function PriceSnapshot({
|
|
|
433
449
|
</div>
|
|
434
450
|
<div>
|
|
435
451
|
<p className="text-muted-foreground text-sm">Last Updated</p>
|
|
436
|
-
<p className="font-medium
|
|
452
|
+
<p className="text-lg font-medium">
|
|
437
453
|
{new Date(time).toLocaleTimeString()}
|
|
438
454
|
</p>
|
|
439
455
|
</div>
|
|
@@ -451,7 +467,7 @@ export function PriceSnapshot({
|
|
|
451
467
|
"use client";
|
|
452
468
|
|
|
453
469
|
import { PriceSnapshot } from "./price-snapshot";
|
|
454
|
-
import {
|
|
470
|
+
import type { ToolCallMessagePartComponent } from "@assistant-ui/react";
|
|
455
471
|
|
|
456
472
|
type PriceSnapshotToolArgs = {
|
|
457
473
|
ticker: string;
|
|
@@ -464,26 +480,23 @@ type PriceSnapshotToolResult = {
|
|
|
464
480
|
time: string;
|
|
465
481
|
};
|
|
466
482
|
};
|
|
467
|
-
export const
|
|
483
|
+
export const PriceSnapshotToolUI: ToolCallMessagePartComponent<
|
|
468
484
|
PriceSnapshotToolArgs,
|
|
469
485
|
string
|
|
470
|
-
>({
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
<
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
);
|
|
485
|
-
},
|
|
486
|
-
});
|
|
486
|
+
> = function PriceSnapshotUI({ args, argsText, result }) {
|
|
487
|
+
const resultObj = result
|
|
488
|
+
? (JSON.parse(result) as PriceSnapshotToolResult)
|
|
489
|
+
: undefined;
|
|
490
|
+
|
|
491
|
+
return (
|
|
492
|
+
<div className="mb-4 flex flex-col items-center gap-2">
|
|
493
|
+
<pre className="whitespace-pre-wrap">price_snapshot({argsText})</pre>
|
|
494
|
+
{resultObj && (
|
|
495
|
+
<PriceSnapshot ticker={args.ticker} {...resultObj.snapshot} />
|
|
496
|
+
)}
|
|
497
|
+
</div>
|
|
498
|
+
);
|
|
499
|
+
};
|
|
487
500
|
|
|
488
501
|
```
|
|
489
502
|
|
|
@@ -494,7 +507,7 @@ export const PriceSnapshotTool = makeAssistantToolUI<
|
|
|
494
507
|
|
|
495
508
|
import { TransactionConfirmationPending } from "./transaction-confirmation-pending";
|
|
496
509
|
import { TransactionConfirmationFinal } from "./transaction-confirmation-final";
|
|
497
|
-
import {
|
|
510
|
+
import type { ToolCallMessagePartComponent } from "@assistant-ui/react";
|
|
498
511
|
|
|
499
512
|
type PurchaseStockArgs = {
|
|
500
513
|
ticker: string;
|
|
@@ -503,39 +516,28 @@ type PurchaseStockArgs = {
|
|
|
503
516
|
maxPurchasePrice: number;
|
|
504
517
|
};
|
|
505
518
|
|
|
506
|
-
export const
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
status,
|
|
514
|
-
addResult,
|
|
515
|
-
}) {
|
|
516
|
-
const resultObj = result
|
|
517
|
-
? (JSON.parse(result) as { transactionId: string })
|
|
518
|
-
: undefined;
|
|
519
|
-
|
|
520
|
-
const handleConfirm = async () => {
|
|
521
|
-
addResult(JSON.stringify({ confirmed: true }));
|
|
522
|
-
};
|
|
519
|
+
export const PurchaseStockToolUI: ToolCallMessagePartComponent<
|
|
520
|
+
PurchaseStockArgs,
|
|
521
|
+
string
|
|
522
|
+
> = function PurchaseStockUI({ args, argsText, result, status, addResult }) {
|
|
523
|
+
const resultObj = result
|
|
524
|
+
? (JSON.parse(result) as { transactionId: string })
|
|
525
|
+
: undefined;
|
|
523
526
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
);
|
|
527
|
+
const handleConfirm = async () => {
|
|
528
|
+
addResult(JSON.stringify({ confirmed: true }));
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
return (
|
|
532
|
+
<div className="mb-4 flex flex-col items-center gap-2">
|
|
533
|
+
<pre className="whitespace-pre-wrap">purchase_stock({argsText})</pre>
|
|
534
|
+
{!resultObj && status.type !== "running" && (
|
|
535
|
+
<TransactionConfirmationPending {...args} onConfirm={handleConfirm} />
|
|
536
|
+
)}
|
|
537
|
+
{resultObj && <TransactionConfirmationFinal {...args} />}
|
|
538
|
+
</div>
|
|
539
|
+
);
|
|
540
|
+
};
|
|
539
541
|
|
|
540
542
|
```
|
|
541
543
|
|
|
@@ -562,13 +564,13 @@ export function TransactionConfirmationFinal(props: TransactionConfirmation) {
|
|
|
562
564
|
<Card className="mx-auto w-full max-w-md">
|
|
563
565
|
<CardHeader className="text-center">
|
|
564
566
|
<CheckCircle className="mx-auto mb-4 h-16 w-16 text-green-500" />
|
|
565
|
-
<CardTitle className="font-bold text-
|
|
567
|
+
<CardTitle className="text-2xl font-bold text-green-700">
|
|
566
568
|
Transaction Confirmed
|
|
567
569
|
</CardTitle>
|
|
568
570
|
</CardHeader>
|
|
569
571
|
<CardContent className="space-y-4">
|
|
570
572
|
<div className="rounded-md border border-green-200 bg-green-50 p-4">
|
|
571
|
-
<h3 className="mb-2 font-semibold text-green-800
|
|
573
|
+
<h3 className="mb-2 text-lg font-semibold text-green-800">
|
|
572
574
|
Purchase Summary
|
|
573
575
|
</h3>
|
|
574
576
|
<div className="grid grid-cols-2 gap-2 text-sm">
|
|
@@ -583,12 +585,12 @@ export function TransactionConfirmationFinal(props: TransactionConfirmation) {
|
|
|
583
585
|
</div>
|
|
584
586
|
</div>
|
|
585
587
|
<div className="rounded-md border border-green-300 bg-green-100 p-4">
|
|
586
|
-
<p className="font-semibold text-green-800
|
|
587
|
-
<p className="font-bold text-
|
|
588
|
+
<p className="text-lg font-semibold text-green-800">Total Cost:</p>
|
|
589
|
+
<p className="text-2xl font-bold text-green-900">
|
|
588
590
|
${(quantity * maxPurchasePrice)?.toFixed(2)}
|
|
589
591
|
</p>
|
|
590
592
|
</div>
|
|
591
|
-
<p className="text-center text-green-600
|
|
593
|
+
<p className="text-center text-sm text-green-600">
|
|
592
594
|
Your purchase of {quantity} shares of {companyName} ({ticker}) has
|
|
593
595
|
been successfully processed.
|
|
594
596
|
</p>
|
|
@@ -629,26 +631,26 @@ export function TransactionConfirmationPending(props: TransactionConfirmation) {
|
|
|
629
631
|
return (
|
|
630
632
|
<Card className="mx-auto w-full max-w-md">
|
|
631
633
|
<CardHeader>
|
|
632
|
-
<CardTitle className="font-bold
|
|
634
|
+
<CardTitle className="text-2xl font-bold">
|
|
633
635
|
Confirm Transaction
|
|
634
636
|
</CardTitle>
|
|
635
637
|
</CardHeader>
|
|
636
638
|
<CardContent className="space-y-4">
|
|
637
639
|
<div className="grid grid-cols-2 gap-2">
|
|
638
|
-
<p className="
|
|
639
|
-
<p className="font-bold
|
|
640
|
-
<p className="
|
|
640
|
+
<p className="text-muted-foreground text-sm font-medium">Ticker:</p>
|
|
641
|
+
<p className="text-sm font-bold">{ticker}</p>
|
|
642
|
+
<p className="text-muted-foreground text-sm font-medium">Company:</p>
|
|
641
643
|
<p className="text-sm">{companyName}</p>
|
|
642
|
-
<p className="
|
|
644
|
+
<p className="text-muted-foreground text-sm font-medium">Quantity:</p>
|
|
643
645
|
<p className="text-sm">{quantity} shares</p>
|
|
644
|
-
<p className="
|
|
646
|
+
<p className="text-muted-foreground text-sm font-medium">
|
|
645
647
|
Max Purchase Price:
|
|
646
648
|
</p>
|
|
647
649
|
<p className="text-sm">${maxPurchasePrice?.toFixed(2)}</p>
|
|
648
650
|
</div>
|
|
649
|
-
<div className="rounded-md
|
|
650
|
-
<p className="font-medium
|
|
651
|
-
<p className="font-bold
|
|
651
|
+
<div className="bg-muted rounded-md p-3">
|
|
652
|
+
<p className="text-sm font-medium">Total Maximum Cost:</p>
|
|
653
|
+
<p className="text-lg font-bold">
|
|
652
654
|
${(quantity * maxPurchasePrice)?.toFixed(2)}
|
|
653
655
|
</p>
|
|
654
656
|
</div>
|
|
@@ -836,6 +838,7 @@ export const sendMessage = (params: {
|
|
|
836
838
|
## next.config.ts
|
|
837
839
|
|
|
838
840
|
```typescript
|
|
841
|
+
import { withAui } from "@assistant-ui/next";
|
|
839
842
|
import type { NextConfig } from "next";
|
|
840
843
|
|
|
841
844
|
const nextConfig: NextConfig = {
|
|
@@ -849,7 +852,7 @@ const nextConfig: NextConfig = {
|
|
|
849
852
|
},
|
|
850
853
|
};
|
|
851
854
|
|
|
852
|
-
export default nextConfig;
|
|
855
|
+
export default withAui(nextConfig);
|
|
853
856
|
|
|
854
857
|
```
|
|
855
858
|
|
|
@@ -871,23 +874,24 @@ export default nextConfig;
|
|
|
871
874
|
"@assistant-ui/react-langgraph": "workspace:*",
|
|
872
875
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
873
876
|
"@assistant-ui/ui": "workspace:*",
|
|
874
|
-
"@langchain/langgraph-sdk": "^1.9.
|
|
877
|
+
"@langchain/langgraph-sdk": "^1.9.10",
|
|
875
878
|
"class-variance-authority": "^0.7.1",
|
|
876
879
|
"clsx": "^2.1.1",
|
|
877
|
-
"lucide-react": "^1.
|
|
878
|
-
"next": "^16.2.
|
|
879
|
-
"react": "^19.2.
|
|
880
|
-
"react-dom": "^19.2.
|
|
881
|
-
"tailwind-merge": "^3.
|
|
880
|
+
"lucide-react": "^1.17.0",
|
|
881
|
+
"next": "^16.2.6",
|
|
882
|
+
"react": "^19.2.6",
|
|
883
|
+
"react-dom": "^19.2.6",
|
|
884
|
+
"tailwind-merge": "^3.6.0"
|
|
882
885
|
},
|
|
883
886
|
"devDependencies": {
|
|
887
|
+
"@assistant-ui/next": "workspace:*",
|
|
884
888
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
885
|
-
"@tailwindcss/postcss": "^4.
|
|
886
|
-
"@types/node": "^25.
|
|
887
|
-
"@types/react": "^19.2.
|
|
889
|
+
"@tailwindcss/postcss": "^4.3.0",
|
|
890
|
+
"@types/node": "^25.9.1",
|
|
891
|
+
"@types/react": "^19.2.15",
|
|
888
892
|
"@types/react-dom": "^19.2.3",
|
|
889
|
-
"postcss": "^8.5.
|
|
890
|
-
"tailwindcss": "^4.
|
|
893
|
+
"postcss": "^8.5.15",
|
|
894
|
+
"tailwindcss": "^4.3.0",
|
|
891
895
|
"tw-animate-css": "^1.4.0",
|
|
892
896
|
"typescript": "^6.0.3"
|
|
893
897
|
}
|
|
@@ -918,10 +922,13 @@ cd my-app
|
|
|
918
922
|
Create `.env.local`:
|
|
919
923
|
|
|
920
924
|
```
|
|
921
|
-
|
|
925
|
+
LANGGRAPH_API_URL=http://localhost:2024
|
|
926
|
+
LANGCHAIN_API_KEY=
|
|
922
927
|
NEXT_PUBLIC_LANGGRAPH_ASSISTANT_ID=stockbroker
|
|
923
928
|
```
|
|
924
929
|
|
|
930
|
+
`LANGGRAPH_API_URL` is the LangGraph deployment URL the bundled `/api/[..._path]` proxy fetches from. `LANGCHAIN_API_KEY` is forwarded as `x-api-key` and can be blank for an unauthenticated dev server. `NEXT_PUBLIC_LANGGRAPH_ASSISTANT_ID` is the graph id (a key under `graphs` in your `langgraph.json`).
|
|
931
|
+
|
|
925
932
|
### Run
|
|
926
933
|
|
|
927
934
|
```bash
|
|
@@ -17,7 +17,7 @@ export async function POST(req: Request) {
|
|
|
17
17
|
const { messages }: { messages: UIMessage[] } = await req.json();
|
|
18
18
|
|
|
19
19
|
const result = streamText({
|
|
20
|
-
model: openai("gpt-
|
|
20
|
+
model: openai("gpt-5.4-nano"),
|
|
21
21
|
messages: await convertToModelMessages(messages),
|
|
22
22
|
stopWhen: stepCountIs(10),
|
|
23
23
|
});
|
|
@@ -219,7 +219,7 @@ import type { FC } from "react";
|
|
|
219
219
|
export const VoiceThread: FC = () => {
|
|
220
220
|
return (
|
|
221
221
|
<ThreadPrimitive.Root
|
|
222
|
-
className="aui-root aui-thread-root flex h-full flex-col
|
|
222
|
+
className="aui-root aui-thread-root bg-background flex h-full flex-col"
|
|
223
223
|
style={{ ["--thread-max-width" as string]: "44rem" }}
|
|
224
224
|
>
|
|
225
225
|
<ThreadPrimitive.Viewport className="aui-thread-viewport relative flex flex-1 flex-col overflow-y-scroll scroll-smooth px-4 pt-4">
|
|
@@ -231,7 +231,7 @@ export const VoiceThread: FC = () => {
|
|
|
231
231
|
{() => <ThreadMessage />}
|
|
232
232
|
</ThreadPrimitive.Messages>
|
|
233
233
|
|
|
234
|
-
<ThreadPrimitive.ViewportFooter className="sticky bottom-0 mx-auto mt-auto flex w-full max-w-(--thread-max-width) flex-col items-center
|
|
234
|
+
<ThreadPrimitive.ViewportFooter className="bg-background sticky bottom-0 mx-auto mt-auto flex w-full max-w-(--thread-max-width) flex-col items-center pt-4 pb-6">
|
|
235
235
|
<ThreadScrollToBottom />
|
|
236
236
|
<VoiceControlCenter />
|
|
237
237
|
</ThreadPrimitive.ViewportFooter>
|
|
@@ -243,7 +243,7 @@ export const VoiceThread: FC = () => {
|
|
|
243
243
|
const VoiceWelcome: FC = () => {
|
|
244
244
|
return (
|
|
245
245
|
<div className="aui-thread-welcome-root mx-auto my-auto flex w-full max-w-(--thread-max-width) grow flex-col items-center justify-center gap-2">
|
|
246
|
-
<p className="fade-in slide-in-from-bottom-1 animate-in fill-mode-both font-semibold
|
|
246
|
+
<p className="fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-2xl font-semibold duration-200">
|
|
247
247
|
Voice Conversation
|
|
248
248
|
</p>
|
|
249
249
|
<p className="fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-muted-foreground delay-75 duration-200">
|
|
@@ -259,7 +259,7 @@ const ThreadScrollToBottom: FC = () => {
|
|
|
259
259
|
<TooltipIconButton
|
|
260
260
|
tooltip="Scroll to bottom"
|
|
261
261
|
variant="outline"
|
|
262
|
-
className="absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible
|
|
262
|
+
className="dark:border-border dark:bg-background dark:hover:bg-accent absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible"
|
|
263
263
|
>
|
|
264
264
|
<ArrowDownIcon />
|
|
265
265
|
</TooltipIconButton>
|
|
@@ -310,7 +310,7 @@ const VoiceWaveform: FC = () => {
|
|
|
310
310
|
return (
|
|
311
311
|
<span
|
|
312
312
|
key={i}
|
|
313
|
-
className="aui-voice-waveform-bar h-full w-[3px] origin-center rounded-full
|
|
313
|
+
className="aui-voice-waveform-bar bg-foreground/50 h-full w-[3px] origin-center rounded-full transition-transform duration-100"
|
|
314
314
|
style={{ transform: `scaleY(${scale})` }}
|
|
315
315
|
/>
|
|
316
316
|
);
|
|
@@ -328,10 +328,10 @@ const ThreadMessage: FC = () => {
|
|
|
328
328
|
const AssistantMessage: FC = () => {
|
|
329
329
|
return (
|
|
330
330
|
<MessagePrimitive.Root
|
|
331
|
-
className="aui-assistant-message-root fade-in slide-in-from-bottom-1 relative mx-auto w-full max-w-(--thread-max-width)
|
|
331
|
+
className="aui-assistant-message-root fade-in slide-in-from-bottom-1 animate-in relative mx-auto w-full max-w-(--thread-max-width) py-3 duration-150"
|
|
332
332
|
data-role="assistant"
|
|
333
333
|
>
|
|
334
|
-
<div className="aui-assistant-message-content
|
|
334
|
+
<div className="aui-assistant-message-content text-foreground px-2 leading-relaxed wrap-break-word">
|
|
335
335
|
<MessagePrimitive.Parts>
|
|
336
336
|
{({ part }) => {
|
|
337
337
|
if (part.type === "text") return <MarkdownText />;
|
|
@@ -346,10 +346,10 @@ const AssistantMessage: FC = () => {
|
|
|
346
346
|
const UserMessage: FC = () => {
|
|
347
347
|
return (
|
|
348
348
|
<MessagePrimitive.Root
|
|
349
|
-
className="aui-user-message-root fade-in slide-in-from-bottom-1 mx-auto flex w-full max-w-(--thread-max-width)
|
|
349
|
+
className="aui-user-message-root fade-in slide-in-from-bottom-1 animate-in mx-auto flex w-full max-w-(--thread-max-width) justify-end px-2 py-3 duration-150"
|
|
350
350
|
data-role="user"
|
|
351
351
|
>
|
|
352
|
-
<div className="aui-user-message-content
|
|
352
|
+
<div className="aui-user-message-content bg-muted text-foreground rounded-2xl px-4 py-2.5 wrap-break-word">
|
|
353
353
|
<MessagePrimitive.Parts />
|
|
354
354
|
</div>
|
|
355
355
|
</MessagePrimitive.Root>
|
|
@@ -535,12 +535,13 @@ export class LiveKitVoiceAdapter implements RealtimeVoiceAdapter {
|
|
|
535
535
|
## next.config.js
|
|
536
536
|
|
|
537
537
|
```javascript
|
|
538
|
+
import { withAui } from "@assistant-ui/next";
|
|
538
539
|
/** @type {import('next').NextConfig} */
|
|
539
540
|
const nextConfig = {
|
|
540
541
|
transpilePackages: ["@assistant-ui/react", "@assistant-ui/react-ai-sdk"],
|
|
541
542
|
};
|
|
542
543
|
|
|
543
|
-
export default nextConfig;
|
|
544
|
+
export default withAui(nextConfig);
|
|
544
545
|
|
|
545
546
|
```
|
|
546
547
|
|
|
@@ -553,32 +554,33 @@ export default nextConfig;
|
|
|
553
554
|
"version": "0.0.0",
|
|
554
555
|
"type": "module",
|
|
555
556
|
"dependencies": {
|
|
556
|
-
"@ai-sdk/openai": "^3.0.
|
|
557
|
-
"@ai-sdk/react": "^3.0.
|
|
557
|
+
"@ai-sdk/openai": "^3.0.67",
|
|
558
|
+
"@ai-sdk/react": "^3.0.195",
|
|
558
559
|
"@assistant-ui/react": "workspace:^",
|
|
559
560
|
"@assistant-ui/react-ai-sdk": "workspace:*",
|
|
560
561
|
"@assistant-ui/react-markdown": "workspace:^",
|
|
561
562
|
"@assistant-ui/ui": "workspace:*",
|
|
562
|
-
"@tailwindcss/postcss": "^4.
|
|
563
|
-
"ai": "^6.0.
|
|
563
|
+
"@tailwindcss/postcss": "^4.3.0",
|
|
564
|
+
"ai": "^6.0.193",
|
|
564
565
|
"class-variance-authority": "^0.7.1",
|
|
565
566
|
"clsx": "^2.1.1",
|
|
566
|
-
"livekit-client": "^2.
|
|
567
|
-
"livekit-server-sdk": "^2.15.
|
|
568
|
-
"lucide-react": "^1.
|
|
569
|
-
"motion": "^12.
|
|
570
|
-
"next": "^16.2.
|
|
571
|
-
"postcss": "^8.5.
|
|
572
|
-
"react": "^19.2.
|
|
573
|
-
"react-dom": "^19.2.
|
|
574
|
-
"tailwind-merge": "^3.
|
|
575
|
-
"tailwindcss": "^4.
|
|
567
|
+
"livekit-client": "^2.19.1",
|
|
568
|
+
"livekit-server-sdk": "^2.15.4",
|
|
569
|
+
"lucide-react": "^1.17.0",
|
|
570
|
+
"motion": "^12.40.0",
|
|
571
|
+
"next": "^16.2.6",
|
|
572
|
+
"postcss": "^8.5.15",
|
|
573
|
+
"react": "^19.2.6",
|
|
574
|
+
"react-dom": "^19.2.6",
|
|
575
|
+
"tailwind-merge": "^3.6.0",
|
|
576
|
+
"tailwindcss": "^4.3.0",
|
|
576
577
|
"zod": "^4.4.3"
|
|
577
578
|
},
|
|
578
579
|
"devDependencies": {
|
|
580
|
+
"@assistant-ui/next": "workspace:*",
|
|
579
581
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
580
|
-
"@types/node": "^25.
|
|
581
|
-
"@types/react": "^19.2.
|
|
582
|
+
"@types/node": "^25.9.1",
|
|
583
|
+
"@types/react": "^19.2.15",
|
|
582
584
|
"@types/react-dom": "^19.2.3",
|
|
583
585
|
"tw-animate-css": "^1.4.0",
|
|
584
586
|
"typescript": "^6.0.3"
|
|
@@ -618,6 +620,7 @@ export default nextConfig;
|
|
|
618
620
|
"@/lib/utils": ["../../packages/ui/src/lib/utils"],
|
|
619
621
|
"@assistant-ui/ui/*": ["../../packages/ui/src/*"],
|
|
620
622
|
"@assistant-ui/*": ["../../packages/*/src"],
|
|
623
|
+
"@assistant-ui/core/*": ["../../packages/core/src/*"],
|
|
621
624
|
"@assistant-ui/react/*": ["../../packages/react/src/*"],
|
|
622
625
|
"@assistant-ui/tap/*": ["../../packages/tap/src/*"],
|
|
623
626
|
"assistant-stream": ["../../packages/assistant-stream/src"],
|