@assistant-ui/mcp-docs-server 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/code-examples/with-ag-ui.md +518 -234
- package/.docs/organized/code-examples/{with-ai-sdk-v5.md → with-ai-sdk-v6.md} +476 -189
- package/.docs/organized/code-examples/with-assistant-transport.md +503 -301
- package/.docs/organized/code-examples/with-cloud.md +524 -226
- package/.docs/organized/code-examples/with-custom-thread-list.md +433 -146
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +2241 -0
- package/.docs/organized/code-examples/with-external-store.md +517 -231
- package/.docs/organized/code-examples/with-ffmpeg.md +500 -220
- package/.docs/organized/code-examples/with-langgraph.md +630 -319
- package/.docs/organized/code-examples/with-parent-id-grouping.md +517 -231
- package/.docs/organized/code-examples/with-react-hook-form.md +517 -233
- package/.docs/organized/code-examples/with-react-router.md +2167 -0
- package/.docs/organized/code-examples/{store-example.md → with-store.md} +18 -22
- package/.docs/organized/code-examples/with-tanstack.md +23 -41
- package/.docs/raw/blog/2025-01-31-changelog/index.mdx +0 -2
- package/.docs/raw/docs/{about-assistantui.mdx → (docs)/about-assistantui.mdx} +2 -1
- package/.docs/raw/docs/{architecture.mdx → (docs)/architecture.mdx} +3 -2
- package/.docs/raw/docs/{cli.mdx → (docs)/cli.mdx} +1 -19
- package/.docs/raw/docs/{copilots → (docs)/copilots}/make-assistant-readable.mdx +1 -0
- package/.docs/raw/docs/{copilots → (docs)/copilots}/make-assistant-tool-ui.mdx +2 -1
- package/.docs/raw/docs/{copilots → (docs)/copilots}/make-assistant-tool.mdx +2 -1
- package/.docs/raw/docs/{copilots → (docs)/copilots}/model-context.mdx +1 -0
- package/.docs/raw/docs/{copilots → (docs)/copilots}/motivation.mdx +1 -0
- package/.docs/raw/docs/{copilots → (docs)/copilots}/use-assistant-instructions.mdx +1 -0
- package/.docs/raw/docs/{devtools.mdx → (docs)/devtools.mdx} +4 -4
- package/.docs/raw/docs/{guides/Attachments.mdx → (docs)/guides/attachments.mdx} +4 -5
- package/.docs/raw/docs/{guides/Branching.mdx → (docs)/guides/branching.mdx} +2 -1
- package/.docs/raw/docs/{guides → (docs)/guides}/context-api.mdx +1 -0
- package/.docs/raw/docs/(docs)/guides/dictation.mdx +370 -0
- package/.docs/raw/docs/{guides/Editing.mdx → (docs)/guides/editing.mdx} +1 -0
- package/.docs/raw/docs/{guides/Latex.mdx → (docs)/guides/latex.mdx} +1 -2
- package/.docs/raw/docs/{guides/Speech.mdx → (docs)/guides/speech.mdx} +9 -10
- package/.docs/raw/docs/{guides/ToolUI.mdx → (docs)/guides/tool-ui.mdx} +15 -14
- package/.docs/raw/docs/{guides/Tools.mdx → (docs)/guides/tools.mdx} +10 -7
- package/.docs/raw/docs/{getting-started.mdx → (docs)/index.mdx} +17 -22
- package/.docs/raw/docs/{mcp-docs-server.mdx → (docs)/mcp-docs-server.mdx} +1 -2
- package/.docs/raw/docs/{api-reference/context-providers/AssistantRuntimeProvider.mdx → (reference)/api-reference/context-providers/assistant-runtime-provider.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/context-providers/TextMessagePartProvider.mdx → (reference)/api-reference/context-providers/text-message-part-provider.mdx} +2 -1
- package/.docs/raw/docs/{api-reference → (reference)/api-reference}/integrations/react-data-stream.mdx +2 -1
- package/.docs/raw/docs/{api-reference → (reference)/api-reference}/integrations/react-hook-form.mdx +2 -1
- package/.docs/raw/docs/{api-reference → (reference)/api-reference}/integrations/vercel-ai-sdk.mdx +2 -2
- package/.docs/raw/docs/{api-reference → (reference)/api-reference}/overview.mdx +1 -1
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +327 -0
- package/.docs/raw/docs/{api-reference/primitives/ActionBar.mdx → (reference)/api-reference/primitives/action-bar.mdx} +3 -1
- package/.docs/raw/docs/{api-reference/primitives/AssistantIf.mdx → (reference)/api-reference/primitives/assistant-if.mdx} +2 -2
- package/.docs/raw/docs/{api-reference/primitives/AssistantModal.mdx → (reference)/api-reference/primitives/assistant-modal.mdx} +3 -1
- package/.docs/raw/docs/{api-reference/primitives/Attachment.mdx → (reference)/api-reference/primitives/attachment.mdx} +3 -2
- package/.docs/raw/docs/{api-reference/primitives/BranchPicker.mdx → (reference)/api-reference/primitives/branch-picker.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/primitives/Composer.mdx → (reference)/api-reference/primitives/composer.mdx} +101 -2
- package/.docs/raw/docs/{api-reference → (reference)/api-reference}/primitives/composition.mdx +1 -0
- package/.docs/raw/docs/{api-reference/primitives/Error.mdx → (reference)/api-reference/primitives/error.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/primitives/MessagePart.mdx → (reference)/api-reference/primitives/message-part.mdx} +2 -2
- package/.docs/raw/docs/{api-reference/primitives/Message.mdx → (reference)/api-reference/primitives/message.mdx} +2 -1
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +221 -0
- package/.docs/raw/docs/{api-reference/primitives/ThreadListItem.mdx → (reference)/api-reference/primitives/thread-list-item.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/primitives/ThreadList.mdx → (reference)/api-reference/primitives/thread-list.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/primitives/Thread.mdx → (reference)/api-reference/primitives/thread.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/runtimes/AssistantRuntime.mdx → (reference)/api-reference/runtimes/assistant-runtime.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/runtimes/AttachmentRuntime.mdx → (reference)/api-reference/runtimes/attachment-runtime.mdx} +3 -2
- package/.docs/raw/docs/{api-reference/runtimes/ComposerRuntime.mdx → (reference)/api-reference/runtimes/composer-runtime.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/runtimes/MessagePartRuntime.mdx → (reference)/api-reference/runtimes/message-part-runtime.mdx} +3 -2
- package/.docs/raw/docs/{api-reference/runtimes/MessageRuntime.mdx → (reference)/api-reference/runtimes/message-runtime.mdx} +3 -2
- package/.docs/raw/docs/{api-reference/runtimes/ThreadListItemRuntime.mdx → (reference)/api-reference/runtimes/thread-list-item-runtime.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/runtimes/ThreadListRuntime.mdx → (reference)/api-reference/runtimes/thread-list-runtime.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/runtimes/ThreadRuntime.mdx → (reference)/api-reference/runtimes/thread-runtime.mdx} +3 -5
- package/.docs/raw/docs/{legacy/styled/AssistantModal.mdx → (reference)/legacy/styled/assistant-modal.mdx} +2 -3
- package/.docs/raw/docs/{legacy/styled/Decomposition.mdx → (reference)/legacy/styled/decomposition.mdx} +1 -0
- package/.docs/raw/docs/{legacy/styled/Markdown.mdx → (reference)/legacy/styled/markdown.mdx} +2 -4
- package/.docs/raw/docs/{legacy/styled/Scrollbar.mdx → (reference)/legacy/styled/scrollbar.mdx} +2 -1
- package/.docs/raw/docs/{legacy/styled/ThreadWidth.mdx → (reference)/legacy/styled/thread-width.mdx} +1 -0
- package/.docs/raw/docs/{legacy/styled/Thread.mdx → (reference)/legacy/styled/thread.mdx} +2 -3
- package/.docs/raw/docs/{migrations → (reference)/migrations}/deprecation-policy.mdx +1 -0
- package/.docs/raw/docs/{migrations → (reference)/migrations}/react-langgraph-v0-7.mdx +1 -2
- package/.docs/raw/docs/{migrations → (reference)/migrations}/v0-11.mdx +1 -0
- package/.docs/raw/docs/{migrations → (reference)/migrations}/v0-12.mdx +1 -0
- package/.docs/raw/docs/{react-compatibility.mdx → (reference)/react-compatibility.mdx} +2 -3
- package/.docs/raw/docs/cloud/authorization.mdx +1 -0
- package/.docs/raw/docs/cloud/overview.mdx +1 -0
- package/.docs/raw/docs/cloud/persistence/ai-sdk.mdx +2 -3
- package/.docs/raw/docs/cloud/persistence/langgraph.mdx +5 -7
- package/.docs/raw/docs/runtimes/ai-sdk/use-chat.mdx +9 -8
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +2 -3
- package/.docs/raw/docs/runtimes/assistant-transport.mdx +7 -6
- package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +38 -3
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +6 -8
- package/.docs/raw/docs/runtimes/custom/local.mdx +43 -16
- package/.docs/raw/docs/runtimes/data-stream.mdx +32 -4
- package/.docs/raw/docs/runtimes/helicone.mdx +1 -0
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +3 -3
- package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +1 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +1 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +1 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +1 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +2 -1
- package/.docs/raw/docs/runtimes/langserve.mdx +2 -2
- package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +4 -5
- package/.docs/raw/docs/runtimes/mastra/overview.mdx +1 -0
- package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +3 -4
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +2 -4
- package/.docs/raw/docs/ui/assistant-modal.mdx +163 -0
- package/.docs/raw/docs/ui/assistant-sidebar.mdx +90 -0
- package/.docs/raw/docs/ui/attachment.mdx +227 -0
- package/.docs/raw/docs/ui/{Markdown.mdx → markdown.mdx} +11 -6
- package/.docs/raw/docs/ui/{Mermaid.mdx → mermaid.mdx} +12 -5
- package/.docs/raw/docs/ui/{PartGrouping.mdx → part-grouping.mdx} +4 -6
- package/.docs/raw/docs/ui/reasoning.mdx +148 -0
- package/.docs/raw/docs/ui/{Scrollbar.mdx → scrollbar.mdx} +9 -7
- package/.docs/raw/docs/ui/sources.mdx +87 -0
- package/.docs/raw/docs/ui/{SyntaxHighlighting.mdx → syntax-highlighting.mdx} +9 -5
- package/.docs/raw/docs/ui/thread-list.mdx +275 -0
- package/.docs/raw/docs/ui/{Thread.mdx → thread.mdx} +5 -6
- package/.docs/raw/docs/ui/tool-fallback.mdx +112 -0
- package/.docs/raw/docs/ui/tool-group.mdx +214 -0
- package/dist/constants.d.ts +10 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +14 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -1
- package/dist/index.js.map +1 -0
- package/dist/prepare-docs/code-examples.d.ts +2 -0
- package/dist/prepare-docs/code-examples.d.ts.map +1 -0
- package/dist/prepare-docs/code-examples.js +129 -0
- package/dist/prepare-docs/code-examples.js.map +1 -0
- package/dist/prepare-docs/copy-raw.d.ts +2 -0
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -0
- package/dist/prepare-docs/copy-raw.js +50 -0
- package/dist/prepare-docs/copy-raw.js.map +1 -0
- package/dist/prepare-docs/prepare.d.ts +2 -0
- package/dist/prepare-docs/prepare.d.ts.map +1 -0
- package/dist/prepare-docs/prepare.js +18 -195
- package/dist/prepare-docs/prepare.js.map +1 -0
- package/dist/stdio.d.ts +3 -0
- package/dist/stdio.d.ts.map +1 -0
- package/dist/stdio.js +4 -5
- package/dist/stdio.js.map +1 -0
- package/dist/tools/docs.d.ts +23 -0
- package/dist/tools/docs.d.ts.map +1 -0
- package/dist/tools/docs.js +168 -0
- package/dist/tools/docs.js.map +1 -0
- package/dist/tools/examples.d.ts +23 -0
- package/dist/tools/examples.d.ts.map +1 -0
- package/dist/tools/examples.js +95 -0
- package/dist/tools/examples.js.map +1 -0
- package/dist/tools/tests/test-setup.d.ts +4 -0
- package/dist/tools/tests/test-setup.d.ts.map +1 -0
- package/dist/tools/tests/test-setup.js +36 -0
- package/dist/tools/tests/test-setup.js.map +1 -0
- package/dist/utils/logger.d.ts +7 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +20 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/mcp-format.d.ts +7 -0
- package/dist/utils/mcp-format.d.ts.map +1 -0
- package/dist/utils/mcp-format.js +11 -0
- package/dist/utils/mcp-format.js.map +1 -0
- package/dist/utils/mdx.d.ts +9 -0
- package/dist/utils/mdx.d.ts.map +1 -0
- package/dist/utils/mdx.js +27 -0
- package/dist/utils/mdx.js.map +1 -0
- package/dist/utils/paths.d.ts +8 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +84 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/security.d.ts +2 -0
- package/dist/utils/security.d.ts.map +1 -0
- package/dist/utils/security.js +43 -0
- package/dist/utils/security.js.map +1 -0
- package/package.json +37 -19
- package/src/constants.ts +22 -0
- package/src/index.ts +51 -0
- package/src/prepare-docs/code-examples.ts +158 -0
- package/src/prepare-docs/copy-raw.ts +55 -0
- package/src/prepare-docs/prepare.ts +24 -0
- package/src/stdio.ts +7 -0
- package/src/tools/docs.ts +207 -0
- package/src/tools/examples.ts +107 -0
- package/src/tools/tests/docs.test.ts +124 -0
- package/src/tools/tests/examples.test.ts +94 -0
- package/src/tools/tests/integration.test.ts +46 -0
- package/src/tools/tests/json-parsing.test.ts +23 -0
- package/src/tools/tests/mcp-protocol.test.ts +133 -0
- package/src/tools/tests/path-traversal.test.ts +81 -0
- package/src/tools/tests/test-setup.ts +40 -0
- package/src/utils/logger.ts +20 -0
- package/src/utils/mcp-format.ts +12 -0
- package/src/utils/mdx.ts +39 -0
- package/src/utils/paths.ts +114 -0
- package/src/utils/security.ts +52 -0
- package/src/utils/tests/security.test.ts +119 -0
- package/.docs/raw/docs/index.mdx +0 -7
- package/.docs/raw/docs/ui/AssistantModal.mdx +0 -45
- package/.docs/raw/docs/ui/AssistantSidebar.mdx +0 -41
- package/.docs/raw/docs/ui/Attachment.mdx +0 -84
- package/.docs/raw/docs/ui/Reasoning.mdx +0 -152
- package/.docs/raw/docs/ui/ThreadList.mdx +0 -90
- package/.docs/raw/docs/ui/ToolFallback.mdx +0 -63
- package/.docs/raw/docs/ui/ToolGroup.mdx +0 -96
- package/dist/chunk-M2RKUM66.js +0 -38
- package/dist/chunk-NVNFQ5ZO.js +0 -423
- /package/.docs/raw/docs/{copilots → (docs)/copilots}/assistant-frame.mdx +0 -0
|
@@ -4,54 +4,52 @@
|
|
|
4
4
|
|
|
5
5
|
```css
|
|
6
6
|
@import "tailwindcss";
|
|
7
|
-
|
|
8
|
-
@plugin "tailwindcss-animate";
|
|
9
7
|
@import "tw-animate-css";
|
|
10
8
|
|
|
11
9
|
@custom-variant dark (&:is(.dark *));
|
|
12
10
|
|
|
13
11
|
@theme inline {
|
|
14
|
-
--color-background: var(--background);
|
|
15
|
-
--color-foreground: var(--foreground);
|
|
16
|
-
--font-sans: var(--font-geist-sans);
|
|
17
|
-
--font-mono: var(--font-geist-mono);
|
|
18
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
19
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
20
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
21
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
22
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
23
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
24
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
25
|
-
--color-sidebar: var(--sidebar);
|
|
26
|
-
--color-chart-5: var(--chart-5);
|
|
27
|
-
--color-chart-4: var(--chart-4);
|
|
28
|
-
--color-chart-3: var(--chart-3);
|
|
29
|
-
--color-chart-2: var(--chart-2);
|
|
30
|
-
--color-chart-1: var(--chart-1);
|
|
31
|
-
--color-ring: var(--ring);
|
|
32
|
-
--color-input: var(--input);
|
|
33
|
-
--color-border: var(--border);
|
|
34
|
-
--color-destructive: var(--destructive);
|
|
35
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
36
|
-
--color-accent: var(--accent);
|
|
37
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
38
|
-
--color-muted: var(--muted);
|
|
39
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
40
|
-
--color-secondary: var(--secondary);
|
|
41
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
42
|
-
--color-primary: var(--primary);
|
|
43
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
44
|
-
--color-popover: var(--popover);
|
|
45
|
-
--color-card-foreground: var(--card-foreground);
|
|
46
|
-
--color-card: var(--card);
|
|
47
12
|
--radius-sm: calc(var(--radius) - 4px);
|
|
48
13
|
--radius-md: calc(var(--radius) - 2px);
|
|
49
14
|
--radius-lg: var(--radius);
|
|
50
15
|
--radius-xl: calc(var(--radius) + 4px);
|
|
16
|
+
--color-background: var(--background);
|
|
17
|
+
--color-foreground: var(--foreground);
|
|
18
|
+
--color-card: var(--card);
|
|
19
|
+
--color-card-foreground: var(--card-foreground);
|
|
20
|
+
--color-popover: var(--popover);
|
|
21
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
22
|
+
--color-primary: var(--primary);
|
|
23
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
24
|
+
--color-secondary: var(--secondary);
|
|
25
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
26
|
+
--color-muted: var(--muted);
|
|
27
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
28
|
+
--color-accent: var(--accent);
|
|
29
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
30
|
+
--color-destructive: var(--destructive);
|
|
31
|
+
--color-border: var(--border);
|
|
32
|
+
--color-input: var(--input);
|
|
33
|
+
--color-ring: var(--ring);
|
|
34
|
+
--color-chart-1: var(--chart-1);
|
|
35
|
+
--color-chart-2: var(--chart-2);
|
|
36
|
+
--color-chart-3: var(--chart-3);
|
|
37
|
+
--color-chart-4: var(--chart-4);
|
|
38
|
+
--color-chart-5: var(--chart-5);
|
|
39
|
+
--color-sidebar: var(--sidebar);
|
|
40
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
41
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
42
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
43
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
44
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
45
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
46
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
:root {
|
|
54
50
|
--radius: 0.625rem;
|
|
51
|
+
--background: oklch(1 0 0);
|
|
52
|
+
--foreground: oklch(0.141 0.005 285.823);
|
|
55
53
|
--card: oklch(1 0 0);
|
|
56
54
|
--card-foreground: oklch(0.141 0.005 285.823);
|
|
57
55
|
--popover: oklch(1 0 0);
|
|
@@ -81,8 +79,6 @@
|
|
|
81
79
|
--sidebar-accent-foreground: oklch(0.21 0.006 285.885);
|
|
82
80
|
--sidebar-border: oklch(0.92 0.004 286.32);
|
|
83
81
|
--sidebar-ring: oklch(0.705 0.015 286.067);
|
|
84
|
-
--background: oklch(1 0 0);
|
|
85
|
-
--foreground: oklch(0.141 0.005 285.823);
|
|
86
82
|
}
|
|
87
83
|
|
|
88
84
|
.dark {
|
|
@@ -339,13 +335,12 @@ export default function Home() {
|
|
|
339
335
|
"rsc": true,
|
|
340
336
|
"tsx": true,
|
|
341
337
|
"tailwind": {
|
|
342
|
-
"config": "
|
|
338
|
+
"config": "",
|
|
343
339
|
"css": "app/globals.css",
|
|
344
340
|
"baseColor": "zinc",
|
|
345
341
|
"cssVariables": true,
|
|
346
342
|
"prefix": ""
|
|
347
343
|
},
|
|
348
|
-
"iconLibrary": "lucide",
|
|
349
344
|
"aliases": {
|
|
350
345
|
"components": "@/components",
|
|
351
346
|
"utils": "@/lib/utils",
|
|
@@ -353,7 +348,7 @@ export default function Home() {
|
|
|
353
348
|
"lib": "@/lib",
|
|
354
349
|
"hooks": "@/hooks"
|
|
355
350
|
},
|
|
356
|
-
"
|
|
351
|
+
"iconLibrary": "lucide"
|
|
357
352
|
}
|
|
358
353
|
|
|
359
354
|
```
|
|
@@ -588,7 +583,7 @@ export const ComposerAddAttachment: FC = () => {
|
|
|
588
583
|
side="bottom"
|
|
589
584
|
variant="ghost"
|
|
590
585
|
size="icon"
|
|
591
|
-
className="aui-composer-add-attachment size-
|
|
586
|
+
className="aui-composer-add-attachment size-8.5 rounded-full p-1 font-semibold text-xs hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30"
|
|
592
587
|
aria-label="Add Attachment"
|
|
593
588
|
>
|
|
594
589
|
<PlusIcon className="aui-attachment-add-icon size-5 stroke-[1.5px]" />
|
|
@@ -847,6 +842,7 @@ import { TooltipIconButton } from "@/components/assistant-ui/tooltip-icon-button
|
|
|
847
842
|
import { Button } from "@/components/ui/button";
|
|
848
843
|
import { cn } from "@/lib/utils";
|
|
849
844
|
import {
|
|
845
|
+
ActionBarMorePrimitive,
|
|
850
846
|
ActionBarPrimitive,
|
|
851
847
|
AssistantIf,
|
|
852
848
|
BranchPickerPrimitive,
|
|
@@ -863,6 +859,7 @@ import {
|
|
|
863
859
|
ChevronRightIcon,
|
|
864
860
|
CopyIcon,
|
|
865
861
|
DownloadIcon,
|
|
862
|
+
MoreHorizontalIcon,
|
|
866
863
|
PencilIcon,
|
|
867
864
|
RefreshCwIcon,
|
|
868
865
|
SquareIcon,
|
|
@@ -908,7 +905,7 @@ const ThreadScrollToBottom: FC = () => {
|
|
|
908
905
|
<TooltipIconButton
|
|
909
906
|
tooltip="Scroll to bottom"
|
|
910
907
|
variant="outline"
|
|
911
|
-
className="aui-thread-scroll-to-bottom -top-12
|
|
908
|
+
className="aui-thread-scroll-to-bottom absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible dark:bg-background dark:hover:bg-accent"
|
|
912
909
|
>
|
|
913
910
|
<ArrowDownIcon />
|
|
914
911
|
</TooltipIconButton>
|
|
@@ -1072,7 +1069,7 @@ const AssistantActionBar: FC = () => {
|
|
|
1072
1069
|
hideWhenRunning
|
|
1073
1070
|
autohide="not-last"
|
|
1074
1071
|
autohideFloat="single-branch"
|
|
1075
|
-
className="aui-assistant-action-bar-root
|
|
1072
|
+
className="aui-assistant-action-bar-root col-start-3 row-start-2 -ml-1 flex gap-1 text-muted-foreground data-floating:absolute data-floating:rounded-md data-floating:border data-floating:bg-background data-floating:p-1 data-floating:shadow-sm"
|
|
1076
1073
|
>
|
|
1077
1074
|
<ActionBarPrimitive.Copy asChild>
|
|
1078
1075
|
<TooltipIconButton tooltip="Copy">
|
|
@@ -1084,16 +1081,33 @@ const AssistantActionBar: FC = () => {
|
|
|
1084
1081
|
</AssistantIf>
|
|
1085
1082
|
</TooltipIconButton>
|
|
1086
1083
|
</ActionBarPrimitive.Copy>
|
|
1087
|
-
<ActionBarPrimitive.ExportMarkdown asChild>
|
|
1088
|
-
<TooltipIconButton tooltip="Export as Markdown">
|
|
1089
|
-
<DownloadIcon />
|
|
1090
|
-
</TooltipIconButton>
|
|
1091
|
-
</ActionBarPrimitive.ExportMarkdown>
|
|
1092
1084
|
<ActionBarPrimitive.Reload asChild>
|
|
1093
1085
|
<TooltipIconButton tooltip="Refresh">
|
|
1094
1086
|
<RefreshCwIcon />
|
|
1095
1087
|
</TooltipIconButton>
|
|
1096
1088
|
</ActionBarPrimitive.Reload>
|
|
1089
|
+
<ActionBarMorePrimitive.Root>
|
|
1090
|
+
<ActionBarMorePrimitive.Trigger asChild>
|
|
1091
|
+
<TooltipIconButton
|
|
1092
|
+
tooltip="More"
|
|
1093
|
+
className="data-[state=open]:bg-accent"
|
|
1094
|
+
>
|
|
1095
|
+
<MoreHorizontalIcon />
|
|
1096
|
+
</TooltipIconButton>
|
|
1097
|
+
</ActionBarMorePrimitive.Trigger>
|
|
1098
|
+
<ActionBarMorePrimitive.Content
|
|
1099
|
+
side="bottom"
|
|
1100
|
+
align="start"
|
|
1101
|
+
className="aui-action-bar-more-content z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md"
|
|
1102
|
+
>
|
|
1103
|
+
<ActionBarPrimitive.ExportMarkdown asChild>
|
|
1104
|
+
<ActionBarMorePrimitive.Item className="aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground">
|
|
1105
|
+
<DownloadIcon className="size-4" />
|
|
1106
|
+
Export as Markdown
|
|
1107
|
+
</ActionBarMorePrimitive.Item>
|
|
1108
|
+
</ActionBarPrimitive.ExportMarkdown>
|
|
1109
|
+
</ActionBarMorePrimitive.Content>
|
|
1110
|
+
</ActionBarMorePrimitive.Root>
|
|
1097
1111
|
</ActionBarPrimitive.Root>
|
|
1098
1112
|
);
|
|
1099
1113
|
};
|
|
@@ -1110,12 +1124,12 @@ const UserMessage: FC = () => {
|
|
|
1110
1124
|
<div className="aui-user-message-content wrap-break-word rounded-2xl bg-muted px-4 py-2.5 text-foreground">
|
|
1111
1125
|
<MessagePrimitive.Parts />
|
|
1112
1126
|
</div>
|
|
1113
|
-
<div className="aui-user-action-bar-wrapper -translate-x-full -translate-y-1/2
|
|
1127
|
+
<div className="aui-user-action-bar-wrapper absolute top-1/2 left-0 -translate-x-full -translate-y-1/2 pr-2">
|
|
1114
1128
|
<UserActionBar />
|
|
1115
1129
|
</div>
|
|
1116
1130
|
</div>
|
|
1117
1131
|
|
|
1118
|
-
<BranchPicker className="aui-user-branch-picker
|
|
1132
|
+
<BranchPicker className="aui-user-branch-picker col-span-full col-start-1 row-start-3 -mr-1 justify-end" />
|
|
1119
1133
|
</MessagePrimitive.Root>
|
|
1120
1134
|
);
|
|
1121
1135
|
};
|
|
@@ -1167,7 +1181,7 @@ const BranchPicker: FC<BranchPickerPrimitive.Root.Props> = ({
|
|
|
1167
1181
|
<BranchPickerPrimitive.Root
|
|
1168
1182
|
hideWhenSingleBranch
|
|
1169
1183
|
className={cn(
|
|
1170
|
-
"aui-branch-picker-root -
|
|
1184
|
+
"aui-branch-picker-root mr-2 -ml-2 inline-flex items-center text-muted-foreground text-xs",
|
|
1171
1185
|
className,
|
|
1172
1186
|
)}
|
|
1173
1187
|
{...rest}
|
|
@@ -1194,98 +1208,329 @@ const BranchPicker: FC<BranchPickerPrimitive.Root.Props> = ({
|
|
|
1194
1208
|
## components/assistant-ui/tool-fallback.tsx
|
|
1195
1209
|
|
|
1196
1210
|
```tsx
|
|
1197
|
-
|
|
1211
|
+
"use client";
|
|
1212
|
+
|
|
1213
|
+
import { memo, useCallback, useRef, useState } from "react";
|
|
1198
1214
|
import {
|
|
1215
|
+
AlertCircleIcon,
|
|
1199
1216
|
CheckIcon,
|
|
1200
1217
|
ChevronDownIcon,
|
|
1201
|
-
|
|
1218
|
+
LoaderIcon,
|
|
1202
1219
|
XCircleIcon,
|
|
1203
1220
|
} from "lucide-react";
|
|
1204
|
-
import {
|
|
1205
|
-
|
|
1221
|
+
import {
|
|
1222
|
+
useScrollLock,
|
|
1223
|
+
type ToolCallMessagePartStatus,
|
|
1224
|
+
type ToolCallMessagePartComponent,
|
|
1225
|
+
} from "@assistant-ui/react";
|
|
1226
|
+
import {
|
|
1227
|
+
Collapsible,
|
|
1228
|
+
CollapsibleContent,
|
|
1229
|
+
CollapsibleTrigger,
|
|
1230
|
+
} from "@/components/ui/collapsible";
|
|
1206
1231
|
import { cn } from "@/lib/utils";
|
|
1207
1232
|
|
|
1208
|
-
|
|
1233
|
+
const ANIMATION_DURATION = 200;
|
|
1234
|
+
|
|
1235
|
+
export type ToolFallbackRootProps = Omit<
|
|
1236
|
+
React.ComponentProps<typeof Collapsible>,
|
|
1237
|
+
"open" | "onOpenChange"
|
|
1238
|
+
> & {
|
|
1239
|
+
open?: boolean;
|
|
1240
|
+
onOpenChange?: (open: boolean) => void;
|
|
1241
|
+
defaultOpen?: boolean;
|
|
1242
|
+
};
|
|
1243
|
+
|
|
1244
|
+
function ToolFallbackRoot({
|
|
1245
|
+
className,
|
|
1246
|
+
open: controlledOpen,
|
|
1247
|
+
onOpenChange: controlledOnOpenChange,
|
|
1248
|
+
defaultOpen = false,
|
|
1249
|
+
children,
|
|
1250
|
+
...props
|
|
1251
|
+
}: ToolFallbackRootProps) {
|
|
1252
|
+
const collapsibleRef = useRef<HTMLDivElement>(null);
|
|
1253
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
1254
|
+
const lockScroll = useScrollLock(collapsibleRef, ANIMATION_DURATION);
|
|
1255
|
+
|
|
1256
|
+
const isControlled = controlledOpen !== undefined;
|
|
1257
|
+
const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
|
|
1258
|
+
|
|
1259
|
+
const handleOpenChange = useCallback(
|
|
1260
|
+
(open: boolean) => {
|
|
1261
|
+
if (!open) {
|
|
1262
|
+
lockScroll();
|
|
1263
|
+
}
|
|
1264
|
+
if (!isControlled) {
|
|
1265
|
+
setUncontrolledOpen(open);
|
|
1266
|
+
}
|
|
1267
|
+
controlledOnOpenChange?.(open);
|
|
1268
|
+
},
|
|
1269
|
+
[lockScroll, isControlled, controlledOnOpenChange],
|
|
1270
|
+
);
|
|
1271
|
+
|
|
1272
|
+
return (
|
|
1273
|
+
<Collapsible
|
|
1274
|
+
ref={collapsibleRef}
|
|
1275
|
+
data-slot="tool-fallback-root"
|
|
1276
|
+
open={isOpen}
|
|
1277
|
+
onOpenChange={handleOpenChange}
|
|
1278
|
+
className={cn(
|
|
1279
|
+
"aui-tool-fallback-root group/tool-fallback-root w-full rounded-lg border py-3",
|
|
1280
|
+
className,
|
|
1281
|
+
)}
|
|
1282
|
+
style={
|
|
1283
|
+
{
|
|
1284
|
+
"--animation-duration": `${ANIMATION_DURATION}ms`,
|
|
1285
|
+
} as React.CSSProperties
|
|
1286
|
+
}
|
|
1287
|
+
{...props}
|
|
1288
|
+
>
|
|
1289
|
+
{children}
|
|
1290
|
+
</Collapsible>
|
|
1291
|
+
);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
type ToolStatus = ToolCallMessagePartStatus["type"];
|
|
1295
|
+
|
|
1296
|
+
const statusIconMap: Record<ToolStatus, React.ElementType> = {
|
|
1297
|
+
running: LoaderIcon,
|
|
1298
|
+
complete: CheckIcon,
|
|
1299
|
+
incomplete: XCircleIcon,
|
|
1300
|
+
"requires-action": AlertCircleIcon,
|
|
1301
|
+
};
|
|
1302
|
+
|
|
1303
|
+
function ToolFallbackTrigger({
|
|
1209
1304
|
toolName,
|
|
1210
|
-
argsText,
|
|
1211
|
-
result,
|
|
1212
1305
|
status,
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1306
|
+
className,
|
|
1307
|
+
...props
|
|
1308
|
+
}: React.ComponentProps<typeof CollapsibleTrigger> & {
|
|
1309
|
+
toolName: string;
|
|
1310
|
+
status?: ToolCallMessagePartStatus;
|
|
1311
|
+
}) {
|
|
1312
|
+
const statusType = status?.type ?? "complete";
|
|
1313
|
+
const isRunning = statusType === "running";
|
|
1216
1314
|
const isCancelled =
|
|
1217
1315
|
status?.type === "incomplete" && status.reason === "cancelled";
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
? status.error
|
|
1222
|
-
: JSON.stringify(status.error)
|
|
1223
|
-
: null;
|
|
1316
|
+
|
|
1317
|
+
const Icon = statusIconMap[statusType];
|
|
1318
|
+
const label = isCancelled ? "Cancelled tool" : "Used tool";
|
|
1224
1319
|
|
|
1225
1320
|
return (
|
|
1226
|
-
<
|
|
1321
|
+
<CollapsibleTrigger
|
|
1322
|
+
data-slot="tool-fallback-trigger"
|
|
1227
1323
|
className={cn(
|
|
1228
|
-
"aui-tool-fallback-
|
|
1229
|
-
|
|
1324
|
+
"aui-tool-fallback-trigger group/trigger flex w-full items-center gap-2 px-4 text-sm transition-colors",
|
|
1325
|
+
className,
|
|
1230
1326
|
)}
|
|
1327
|
+
{...props}
|
|
1231
1328
|
>
|
|
1232
|
-
<
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1329
|
+
<Icon
|
|
1330
|
+
data-slot="tool-fallback-trigger-icon"
|
|
1331
|
+
className={cn(
|
|
1332
|
+
"aui-tool-fallback-trigger-icon size-4 shrink-0",
|
|
1333
|
+
isCancelled && "text-muted-foreground",
|
|
1334
|
+
isRunning && "animate-spin",
|
|
1237
1335
|
)}
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
<div className="aui-tool-fallback-cancelled-root px-4">
|
|
1255
|
-
<p className="aui-tool-fallback-cancelled-header font-semibold text-muted-foreground">
|
|
1256
|
-
Cancelled reason:
|
|
1257
|
-
</p>
|
|
1258
|
-
<p className="aui-tool-fallback-cancelled-reason text-muted-foreground">
|
|
1259
|
-
{cancelledReason}
|
|
1260
|
-
</p>
|
|
1261
|
-
</div>
|
|
1262
|
-
)}
|
|
1263
|
-
<div
|
|
1264
|
-
className={cn(
|
|
1265
|
-
"aui-tool-fallback-args-root px-4",
|
|
1266
|
-
isCancelled && "opacity-60",
|
|
1267
|
-
)}
|
|
1336
|
+
/>
|
|
1337
|
+
<span
|
|
1338
|
+
data-slot="tool-fallback-trigger-label"
|
|
1339
|
+
className={cn(
|
|
1340
|
+
"aui-tool-fallback-trigger-label-wrapper relative inline-block grow text-left leading-none",
|
|
1341
|
+
isCancelled && "text-muted-foreground line-through",
|
|
1342
|
+
)}
|
|
1343
|
+
>
|
|
1344
|
+
<span>
|
|
1345
|
+
{label}: <b>{toolName}</b>
|
|
1346
|
+
</span>
|
|
1347
|
+
{isRunning && (
|
|
1348
|
+
<span
|
|
1349
|
+
aria-hidden
|
|
1350
|
+
data-slot="tool-fallback-trigger-shimmer"
|
|
1351
|
+
className="aui-tool-fallback-trigger-shimmer shimmer pointer-events-none absolute inset-0 motion-reduce:animate-none"
|
|
1268
1352
|
>
|
|
1269
|
-
<
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1353
|
+
{label}: <b>{toolName}</b>
|
|
1354
|
+
</span>
|
|
1355
|
+
)}
|
|
1356
|
+
</span>
|
|
1357
|
+
<ChevronDownIcon
|
|
1358
|
+
data-slot="tool-fallback-trigger-chevron"
|
|
1359
|
+
className={cn(
|
|
1360
|
+
"aui-tool-fallback-trigger-chevron size-4 shrink-0",
|
|
1361
|
+
"transition-transform duration-(--animation-duration) ease-out",
|
|
1362
|
+
"group-data-[state=closed]/trigger:-rotate-90",
|
|
1363
|
+
"group-data-[state=open]/trigger:rotate-0",
|
|
1364
|
+
)}
|
|
1365
|
+
/>
|
|
1366
|
+
</CollapsibleTrigger>
|
|
1367
|
+
);
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
function ToolFallbackContent({
|
|
1371
|
+
className,
|
|
1372
|
+
children,
|
|
1373
|
+
...props
|
|
1374
|
+
}: React.ComponentProps<typeof CollapsibleContent>) {
|
|
1375
|
+
return (
|
|
1376
|
+
<CollapsibleContent
|
|
1377
|
+
data-slot="tool-fallback-content"
|
|
1378
|
+
className={cn(
|
|
1379
|
+
"aui-tool-fallback-content relative overflow-hidden text-sm outline-none",
|
|
1380
|
+
"group/collapsible-content ease-out",
|
|
1381
|
+
"data-[state=closed]:animate-collapsible-up",
|
|
1382
|
+
"data-[state=open]:animate-collapsible-down",
|
|
1383
|
+
"data-[state=closed]:fill-mode-forwards",
|
|
1384
|
+
"data-[state=closed]:pointer-events-none",
|
|
1385
|
+
"data-[state=open]:duration-(--animation-duration)",
|
|
1386
|
+
"data-[state=closed]:duration-(--animation-duration)",
|
|
1387
|
+
className,
|
|
1286
1388
|
)}
|
|
1389
|
+
{...props}
|
|
1390
|
+
>
|
|
1391
|
+
<div className="mt-3 flex flex-col gap-2 border-t pt-2">{children}</div>
|
|
1392
|
+
</CollapsibleContent>
|
|
1393
|
+
);
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
function ToolFallbackArgs({
|
|
1397
|
+
argsText,
|
|
1398
|
+
className,
|
|
1399
|
+
...props
|
|
1400
|
+
}: React.ComponentProps<"div"> & {
|
|
1401
|
+
argsText?: string;
|
|
1402
|
+
}) {
|
|
1403
|
+
if (!argsText) return null;
|
|
1404
|
+
|
|
1405
|
+
return (
|
|
1406
|
+
<div
|
|
1407
|
+
data-slot="tool-fallback-args"
|
|
1408
|
+
className={cn("aui-tool-fallback-args px-4", className)}
|
|
1409
|
+
{...props}
|
|
1410
|
+
>
|
|
1411
|
+
<pre className="aui-tool-fallback-args-value whitespace-pre-wrap">
|
|
1412
|
+
{argsText}
|
|
1413
|
+
</pre>
|
|
1414
|
+
</div>
|
|
1415
|
+
);
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
function ToolFallbackResult({
|
|
1419
|
+
result,
|
|
1420
|
+
className,
|
|
1421
|
+
...props
|
|
1422
|
+
}: React.ComponentProps<"div"> & {
|
|
1423
|
+
result?: unknown;
|
|
1424
|
+
}) {
|
|
1425
|
+
if (result === undefined) return null;
|
|
1426
|
+
|
|
1427
|
+
return (
|
|
1428
|
+
<div
|
|
1429
|
+
data-slot="tool-fallback-result"
|
|
1430
|
+
className={cn(
|
|
1431
|
+
"aui-tool-fallback-result border-t border-dashed px-4 pt-2",
|
|
1432
|
+
className,
|
|
1433
|
+
)}
|
|
1434
|
+
{...props}
|
|
1435
|
+
>
|
|
1436
|
+
<p className="aui-tool-fallback-result-header font-semibold">Result:</p>
|
|
1437
|
+
<pre className="aui-tool-fallback-result-content whitespace-pre-wrap">
|
|
1438
|
+
{typeof result === "string" ? result : JSON.stringify(result, null, 2)}
|
|
1439
|
+
</pre>
|
|
1440
|
+
</div>
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
function ToolFallbackError({
|
|
1445
|
+
status,
|
|
1446
|
+
className,
|
|
1447
|
+
...props
|
|
1448
|
+
}: React.ComponentProps<"div"> & {
|
|
1449
|
+
status?: ToolCallMessagePartStatus;
|
|
1450
|
+
}) {
|
|
1451
|
+
if (status?.type !== "incomplete") return null;
|
|
1452
|
+
|
|
1453
|
+
const error = status.error;
|
|
1454
|
+
const errorText = error
|
|
1455
|
+
? typeof error === "string"
|
|
1456
|
+
? error
|
|
1457
|
+
: JSON.stringify(error)
|
|
1458
|
+
: null;
|
|
1459
|
+
|
|
1460
|
+
if (!errorText) return null;
|
|
1461
|
+
|
|
1462
|
+
const isCancelled = status.reason === "cancelled";
|
|
1463
|
+
const headerText = isCancelled ? "Cancelled reason:" : "Error:";
|
|
1464
|
+
|
|
1465
|
+
return (
|
|
1466
|
+
<div
|
|
1467
|
+
data-slot="tool-fallback-error"
|
|
1468
|
+
className={cn("aui-tool-fallback-error px-4", className)}
|
|
1469
|
+
{...props}
|
|
1470
|
+
>
|
|
1471
|
+
<p className="aui-tool-fallback-error-header font-semibold text-muted-foreground">
|
|
1472
|
+
{headerText}
|
|
1473
|
+
</p>
|
|
1474
|
+
<p className="aui-tool-fallback-error-reason text-muted-foreground">
|
|
1475
|
+
{errorText}
|
|
1476
|
+
</p>
|
|
1287
1477
|
</div>
|
|
1288
1478
|
);
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
const ToolFallbackImpl: ToolCallMessagePartComponent = ({
|
|
1482
|
+
toolName,
|
|
1483
|
+
argsText,
|
|
1484
|
+
result,
|
|
1485
|
+
status,
|
|
1486
|
+
}) => {
|
|
1487
|
+
const isCancelled =
|
|
1488
|
+
status?.type === "incomplete" && status.reason === "cancelled";
|
|
1489
|
+
|
|
1490
|
+
return (
|
|
1491
|
+
<ToolFallbackRoot
|
|
1492
|
+
className={cn(isCancelled && "border-muted-foreground/30 bg-muted/30")}
|
|
1493
|
+
>
|
|
1494
|
+
<ToolFallbackTrigger toolName={toolName} status={status} />
|
|
1495
|
+
<ToolFallbackContent>
|
|
1496
|
+
<ToolFallbackError status={status} />
|
|
1497
|
+
<ToolFallbackArgs
|
|
1498
|
+
argsText={argsText}
|
|
1499
|
+
className={cn(isCancelled && "opacity-60")}
|
|
1500
|
+
/>
|
|
1501
|
+
{!isCancelled && <ToolFallbackResult result={result} />}
|
|
1502
|
+
</ToolFallbackContent>
|
|
1503
|
+
</ToolFallbackRoot>
|
|
1504
|
+
);
|
|
1505
|
+
};
|
|
1506
|
+
|
|
1507
|
+
const ToolFallback = memo(
|
|
1508
|
+
ToolFallbackImpl,
|
|
1509
|
+
) as unknown as ToolCallMessagePartComponent & {
|
|
1510
|
+
Root: typeof ToolFallbackRoot;
|
|
1511
|
+
Trigger: typeof ToolFallbackTrigger;
|
|
1512
|
+
Content: typeof ToolFallbackContent;
|
|
1513
|
+
Args: typeof ToolFallbackArgs;
|
|
1514
|
+
Result: typeof ToolFallbackResult;
|
|
1515
|
+
Error: typeof ToolFallbackError;
|
|
1516
|
+
};
|
|
1517
|
+
|
|
1518
|
+
ToolFallback.displayName = "ToolFallback";
|
|
1519
|
+
ToolFallback.Root = ToolFallbackRoot;
|
|
1520
|
+
ToolFallback.Trigger = ToolFallbackTrigger;
|
|
1521
|
+
ToolFallback.Content = ToolFallbackContent;
|
|
1522
|
+
ToolFallback.Args = ToolFallbackArgs;
|
|
1523
|
+
ToolFallback.Result = ToolFallbackResult;
|
|
1524
|
+
ToolFallback.Error = ToolFallbackError;
|
|
1525
|
+
|
|
1526
|
+
export {
|
|
1527
|
+
ToolFallback,
|
|
1528
|
+
ToolFallbackRoot,
|
|
1529
|
+
ToolFallbackTrigger,
|
|
1530
|
+
ToolFallbackContent,
|
|
1531
|
+
ToolFallbackArgs,
|
|
1532
|
+
ToolFallbackResult,
|
|
1533
|
+
ToolFallbackError,
|
|
1289
1534
|
};
|
|
1290
1535
|
|
|
1291
1536
|
```
|
|
@@ -1348,47 +1593,50 @@ import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
|
1348
1593
|
|
|
1349
1594
|
import { cn } from "@/lib/utils";
|
|
1350
1595
|
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
)
|
|
1391
|
-
|
|
1596
|
+
function Avatar({
|
|
1597
|
+
className,
|
|
1598
|
+
...props
|
|
1599
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
|
|
1600
|
+
return (
|
|
1601
|
+
<AvatarPrimitive.Root
|
|
1602
|
+
data-slot="avatar"
|
|
1603
|
+
className={cn(
|
|
1604
|
+
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
1605
|
+
className,
|
|
1606
|
+
)}
|
|
1607
|
+
{...props}
|
|
1608
|
+
/>
|
|
1609
|
+
);
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
function AvatarImage({
|
|
1613
|
+
className,
|
|
1614
|
+
...props
|
|
1615
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
|
1616
|
+
return (
|
|
1617
|
+
<AvatarPrimitive.Image
|
|
1618
|
+
data-slot="avatar-image"
|
|
1619
|
+
className={cn("aspect-square size-full", className)}
|
|
1620
|
+
{...props}
|
|
1621
|
+
/>
|
|
1622
|
+
);
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
function AvatarFallback({
|
|
1626
|
+
className,
|
|
1627
|
+
...props
|
|
1628
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
|
|
1629
|
+
return (
|
|
1630
|
+
<AvatarPrimitive.Fallback
|
|
1631
|
+
data-slot="avatar-fallback"
|
|
1632
|
+
className={cn(
|
|
1633
|
+
"flex size-full items-center justify-center rounded-full bg-muted",
|
|
1634
|
+
className,
|
|
1635
|
+
)}
|
|
1636
|
+
{...props}
|
|
1637
|
+
/>
|
|
1638
|
+
);
|
|
1639
|
+
}
|
|
1392
1640
|
|
|
1393
1641
|
export { Avatar, AvatarImage, AvatarFallback };
|
|
1394
1642
|
|
|
@@ -1408,14 +1656,13 @@ const buttonVariants = cva(
|
|
|
1408
1656
|
{
|
|
1409
1657
|
variants: {
|
|
1410
1658
|
variant: {
|
|
1411
|
-
default:
|
|
1412
|
-
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
1659
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
1413
1660
|
destructive:
|
|
1414
|
-
"bg-destructive text-white
|
|
1661
|
+
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
1415
1662
|
outline:
|
|
1416
1663
|
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
1417
1664
|
secondary:
|
|
1418
|
-
"bg-secondary text-secondary-foreground
|
|
1665
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1419
1666
|
ghost:
|
|
1420
1667
|
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
1421
1668
|
link: "text-primary underline-offset-4 hover:underline",
|
|
@@ -1425,6 +1672,8 @@ const buttonVariants = cva(
|
|
|
1425
1672
|
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
1426
1673
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
1427
1674
|
icon: "size-9",
|
|
1675
|
+
"icon-sm": "size-8",
|
|
1676
|
+
"icon-lg": "size-10",
|
|
1428
1677
|
},
|
|
1429
1678
|
},
|
|
1430
1679
|
defaultVariants: {
|
|
@@ -1436,8 +1685,8 @@ const buttonVariants = cva(
|
|
|
1436
1685
|
|
|
1437
1686
|
function Button({
|
|
1438
1687
|
className,
|
|
1439
|
-
variant,
|
|
1440
|
-
size,
|
|
1688
|
+
variant = "default",
|
|
1689
|
+
size = "default",
|
|
1441
1690
|
asChild = false,
|
|
1442
1691
|
...props
|
|
1443
1692
|
}: React.ComponentProps<"button"> &
|
|
@@ -1449,6 +1698,8 @@ function Button({
|
|
|
1449
1698
|
return (
|
|
1450
1699
|
<Comp
|
|
1451
1700
|
data-slot="button"
|
|
1701
|
+
data-variant={variant}
|
|
1702
|
+
data-size={size}
|
|
1452
1703
|
className={cn(buttonVariants({ variant, size, className }))}
|
|
1453
1704
|
{...props}
|
|
1454
1705
|
/>
|
|
@@ -1459,6 +1710,45 @@ export { Button, buttonVariants };
|
|
|
1459
1710
|
|
|
1460
1711
|
```
|
|
1461
1712
|
|
|
1713
|
+
## components/ui/collapsible.tsx
|
|
1714
|
+
|
|
1715
|
+
```tsx
|
|
1716
|
+
"use client";
|
|
1717
|
+
|
|
1718
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
1719
|
+
|
|
1720
|
+
function Collapsible({
|
|
1721
|
+
...props
|
|
1722
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
|
|
1723
|
+
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
function CollapsibleTrigger({
|
|
1727
|
+
...props
|
|
1728
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
|
|
1729
|
+
return (
|
|
1730
|
+
<CollapsiblePrimitive.CollapsibleTrigger
|
|
1731
|
+
data-slot="collapsible-trigger"
|
|
1732
|
+
{...props}
|
|
1733
|
+
/>
|
|
1734
|
+
);
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
function CollapsibleContent({
|
|
1738
|
+
...props
|
|
1739
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
|
|
1740
|
+
return (
|
|
1741
|
+
<CollapsiblePrimitive.CollapsibleContent
|
|
1742
|
+
data-slot="collapsible-content"
|
|
1743
|
+
{...props}
|
|
1744
|
+
/>
|
|
1745
|
+
);
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
1749
|
+
|
|
1750
|
+
```
|
|
1751
|
+
|
|
1462
1752
|
## components/ui/dialog.tsx
|
|
1463
1753
|
|
|
1464
1754
|
```tsx
|
|
@@ -1502,7 +1792,7 @@ function DialogOverlay({
|
|
|
1502
1792
|
<DialogPrimitive.Overlay
|
|
1503
1793
|
data-slot="dialog-overlay"
|
|
1504
1794
|
className={cn(
|
|
1505
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/
|
|
1795
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
1506
1796
|
className,
|
|
1507
1797
|
)}
|
|
1508
1798
|
{...props}
|
|
@@ -1513,24 +1803,32 @@ function DialogOverlay({
|
|
|
1513
1803
|
function DialogContent({
|
|
1514
1804
|
className,
|
|
1515
1805
|
children,
|
|
1806
|
+
showCloseButton = true,
|
|
1516
1807
|
...props
|
|
1517
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content>
|
|
1808
|
+
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
1809
|
+
showCloseButton?: boolean;
|
|
1810
|
+
}) {
|
|
1518
1811
|
return (
|
|
1519
1812
|
<DialogPortal data-slot="dialog-portal">
|
|
1520
1813
|
<DialogOverlay />
|
|
1521
1814
|
<DialogPrimitive.Content
|
|
1522
1815
|
data-slot="dialog-content"
|
|
1523
1816
|
className={cn(
|
|
1524
|
-
"data-[state=closed]:fade-out-0 data-[state=
|
|
1817
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg",
|
|
1525
1818
|
className,
|
|
1526
1819
|
)}
|
|
1527
1820
|
{...props}
|
|
1528
1821
|
>
|
|
1529
1822
|
{children}
|
|
1530
|
-
|
|
1531
|
-
<
|
|
1532
|
-
|
|
1533
|
-
|
|
1823
|
+
{showCloseButton && (
|
|
1824
|
+
<DialogPrimitive.Close
|
|
1825
|
+
data-slot="dialog-close"
|
|
1826
|
+
className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
1827
|
+
>
|
|
1828
|
+
<XIcon />
|
|
1829
|
+
<span className="sr-only">Close</span>
|
|
1830
|
+
</DialogPrimitive.Close>
|
|
1831
|
+
)}
|
|
1534
1832
|
</DialogPrimitive.Content>
|
|
1535
1833
|
</DialogPortal>
|
|
1536
1834
|
);
|
|
@@ -1651,13 +1949,13 @@ function TooltipContent({
|
|
|
1651
1949
|
data-slot="tooltip-content"
|
|
1652
1950
|
sideOffset={sideOffset}
|
|
1653
1951
|
className={cn(
|
|
1654
|
-
"fade-in-0 zoom-in-95 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) animate-in text-balance rounded-md bg-
|
|
1952
|
+
"fade-in-0 zoom-in-95 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) animate-in text-balance rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=closed]:animate-out",
|
|
1655
1953
|
className,
|
|
1656
1954
|
)}
|
|
1657
1955
|
{...props}
|
|
1658
1956
|
>
|
|
1659
1957
|
{children}
|
|
1660
|
-
<TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-
|
|
1958
|
+
<TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />
|
|
1661
1959
|
</TooltipPrimitive.Content>
|
|
1662
1960
|
</TooltipPrimitive.Portal>
|
|
1663
1961
|
);
|
|
@@ -1705,46 +2003,45 @@ export default nextConfig;
|
|
|
1705
2003
|
|
|
1706
2004
|
```json
|
|
1707
2005
|
{
|
|
1708
|
-
"name": "
|
|
1709
|
-
"private": true,
|
|
2006
|
+
"name": "with-assistant-transport",
|
|
1710
2007
|
"version": "0.0.0",
|
|
2008
|
+
"private": true,
|
|
1711
2009
|
"type": "module",
|
|
2010
|
+
"scripts": {
|
|
2011
|
+
"dev": "next dev",
|
|
2012
|
+
"build": "next build",
|
|
2013
|
+
"start": "next start"
|
|
2014
|
+
},
|
|
1712
2015
|
"dependencies": {
|
|
1713
|
-
"@assistant-ui/react": "workspace
|
|
1714
|
-
"@assistant-ui/react-langgraph": "workspace
|
|
1715
|
-
"@assistant-ui/react-markdown": "workspace
|
|
2016
|
+
"@assistant-ui/react": "workspace:*",
|
|
2017
|
+
"@assistant-ui/react-langgraph": "workspace:*",
|
|
2018
|
+
"@assistant-ui/react-markdown": "workspace:*",
|
|
1716
2019
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
2020
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
1717
2021
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
1718
2022
|
"@radix-ui/react-slot": "^1.2.4",
|
|
1719
2023
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
1720
|
-
"@tailwindcss/postcss": "^4.1.18",
|
|
1721
|
-
"assistant-stream": "^0.2.45",
|
|
1722
2024
|
"class-variance-authority": "^0.7.1",
|
|
1723
2025
|
"clsx": "^2.1.1",
|
|
1724
|
-
"lucide-react": "^0.
|
|
1725
|
-
"next": "16.
|
|
1726
|
-
"
|
|
1727
|
-
"react": "19.2.3",
|
|
1728
|
-
"react-dom": "19.2.3",
|
|
2026
|
+
"lucide-react": "^0.562.0",
|
|
2027
|
+
"next": "^16.1.4",
|
|
2028
|
+
"react": "^19.2.3",
|
|
2029
|
+
"react-dom": "^19.2.3",
|
|
1729
2030
|
"remark-gfm": "^4.0.1",
|
|
1730
2031
|
"tailwind-merge": "^3.4.0",
|
|
1731
|
-
"
|
|
1732
|
-
"
|
|
1733
|
-
"zod": "^4.1.13",
|
|
1734
|
-
"zustand": "^5.0.9"
|
|
2032
|
+
"zod": "^4.3.5",
|
|
2033
|
+
"zustand": "^5.0.10"
|
|
1735
2034
|
},
|
|
1736
2035
|
"devDependencies": {
|
|
1737
2036
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
1738
|
-
"@
|
|
1739
|
-
"@types/
|
|
2037
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
2038
|
+
"@types/node": "^25.0.9",
|
|
2039
|
+
"@types/react": "^19.2.9",
|
|
1740
2040
|
"@types/react-dom": "^19.2.3",
|
|
2041
|
+
"postcss": "^8.5.6",
|
|
2042
|
+
"tailwindcss": "^4.1.18",
|
|
1741
2043
|
"tw-animate-css": "^1.4.0",
|
|
1742
2044
|
"typescript": "^5.9.3"
|
|
1743
|
-
},
|
|
1744
|
-
"scripts": {
|
|
1745
|
-
"dev": "next dev",
|
|
1746
|
-
"build": "next build",
|
|
1747
|
-
"start": "next start"
|
|
1748
2045
|
}
|
|
1749
2046
|
}
|
|
1750
2047
|
|
|
@@ -1926,117 +2223,22 @@ The project uses Tailwind CSS for styling. Modify `app/globals.css` and `tailwin
|
|
|
1926
2223
|
|
|
1927
2224
|
## Learn More
|
|
1928
2225
|
|
|
1929
|
-
- [assistant-ui Documentation](https://
|
|
1930
|
-
- [Assistant Transport Runtime API](https://
|
|
2226
|
+
- [assistant-ui Documentation](https://www.assistant-ui.com/docs)
|
|
2227
|
+
- [Assistant Transport Runtime API](https://www.assistant-ui.com/docs/runtimes/assistant-transport)
|
|
1931
2228
|
- [Next.js Documentation](https://nextjs.org/docs)
|
|
1932
2229
|
|
|
1933
2230
|
```
|
|
1934
2231
|
|
|
1935
|
-
## tailwind.config.js
|
|
1936
|
-
|
|
1937
|
-
```javascript
|
|
1938
|
-
/** @type {import('tailwindcss').Config} */
|
|
1939
|
-
const config = {
|
|
1940
|
-
darkMode: ["class"],
|
|
1941
|
-
content: [
|
|
1942
|
-
"./pages/**/*.{ts,tsx}",
|
|
1943
|
-
"./components/**/*.{ts,tsx}",
|
|
1944
|
-
"./app/**/*.{ts,tsx}",
|
|
1945
|
-
"./src/**/*.{ts,tsx}",
|
|
1946
|
-
],
|
|
1947
|
-
prefix: "",
|
|
1948
|
-
theme: {
|
|
1949
|
-
container: {
|
|
1950
|
-
center: true,
|
|
1951
|
-
padding: "2rem",
|
|
1952
|
-
screens: {
|
|
1953
|
-
"2xl": "1400px",
|
|
1954
|
-
},
|
|
1955
|
-
},
|
|
1956
|
-
extend: {
|
|
1957
|
-
colors: {
|
|
1958
|
-
border: "hsl(var(--border))",
|
|
1959
|
-
input: "hsl(var(--input))",
|
|
1960
|
-
ring: "hsl(var(--ring))",
|
|
1961
|
-
background: "hsl(var(--background))",
|
|
1962
|
-
foreground: "hsl(var(--foreground))",
|
|
1963
|
-
primary: {
|
|
1964
|
-
DEFAULT: "hsl(var(--primary))",
|
|
1965
|
-
foreground: "hsl(var(--primary-foreground))",
|
|
1966
|
-
},
|
|
1967
|
-
secondary: {
|
|
1968
|
-
DEFAULT: "hsl(var(--secondary))",
|
|
1969
|
-
foreground: "hsl(var(--secondary-foreground))",
|
|
1970
|
-
},
|
|
1971
|
-
destructive: {
|
|
1972
|
-
DEFAULT: "hsl(var(--destructive))",
|
|
1973
|
-
foreground: "hsl(var(--destructive-foreground))",
|
|
1974
|
-
},
|
|
1975
|
-
muted: {
|
|
1976
|
-
DEFAULT: "hsl(var(--muted))",
|
|
1977
|
-
foreground: "hsl(var(--muted-foreground))",
|
|
1978
|
-
},
|
|
1979
|
-
accent: {
|
|
1980
|
-
DEFAULT: "hsl(var(--accent))",
|
|
1981
|
-
foreground: "hsl(var(--accent-foreground))",
|
|
1982
|
-
},
|
|
1983
|
-
popover: {
|
|
1984
|
-
DEFAULT: "hsl(var(--popover))",
|
|
1985
|
-
foreground: "hsl(var(--popover-foreground))",
|
|
1986
|
-
},
|
|
1987
|
-
card: {
|
|
1988
|
-
DEFAULT: "hsl(var(--card))",
|
|
1989
|
-
foreground: "hsl(var(--card-foreground))",
|
|
1990
|
-
},
|
|
1991
|
-
},
|
|
1992
|
-
borderRadius: {
|
|
1993
|
-
lg: "var(--radius)",
|
|
1994
|
-
md: "calc(var(--radius) - 2px)",
|
|
1995
|
-
sm: "calc(var(--radius) - 4px)",
|
|
1996
|
-
},
|
|
1997
|
-
keyframes: {
|
|
1998
|
-
"accordion-down": {
|
|
1999
|
-
from: { height: "0" },
|
|
2000
|
-
to: { height: "var(--radix-accordion-content-height)" },
|
|
2001
|
-
},
|
|
2002
|
-
"accordion-up": {
|
|
2003
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
2004
|
-
to: { height: "0" },
|
|
2005
|
-
},
|
|
2006
|
-
},
|
|
2007
|
-
animation: {
|
|
2008
|
-
"accordion-down": "accordion-down 0.2s ease-out",
|
|
2009
|
-
"accordion-up": "accordion-up 0.2s ease-out",
|
|
2010
|
-
},
|
|
2011
|
-
},
|
|
2012
|
-
},
|
|
2013
|
-
plugins: [],
|
|
2014
|
-
};
|
|
2015
|
-
|
|
2016
|
-
export default config;
|
|
2017
|
-
|
|
2018
|
-
```
|
|
2019
|
-
|
|
2020
2232
|
## tsconfig.json
|
|
2021
2233
|
|
|
2022
2234
|
```json
|
|
2023
2235
|
{
|
|
2024
|
-
"extends": "@assistant-ui/x-buildutils/ts/
|
|
2236
|
+
"extends": "@assistant-ui/x-buildutils/ts/next",
|
|
2025
2237
|
"compilerOptions": {
|
|
2026
|
-
"paths": {
|
|
2027
|
-
"@/*": ["./*"]
|
|
2028
|
-
},
|
|
2029
|
-
"allowJs": true,
|
|
2030
|
-
"incremental": true,
|
|
2031
|
-
"jsx": "preserve",
|
|
2032
|
-
"plugins": [
|
|
2033
|
-
{
|
|
2034
|
-
"name": "next"
|
|
2035
|
-
}
|
|
2036
|
-
]
|
|
2238
|
+
"paths": { "@/*": ["./*"] }
|
|
2037
2239
|
},
|
|
2038
2240
|
"include": ["**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
2039
|
-
"exclude": ["node_modules"
|
|
2241
|
+
"exclude": ["node_modules"]
|
|
2040
2242
|
}
|
|
2041
2243
|
|
|
2042
2244
|
```
|