@assistant-ui/mcp-docs-server 0.1.16 → 0.1.18
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 +149 -155
- package/.docs/organized/code-examples/with-ai-sdk-v5.md +98 -103
- package/.docs/organized/code-examples/with-assistant-transport.md +134 -222
- package/.docs/organized/code-examples/with-cloud.md +127 -134
- package/.docs/organized/code-examples/with-custom-thread-list.md +28 -48
- package/.docs/organized/code-examples/with-external-store.md +149 -154
- package/.docs/organized/code-examples/with-ffmpeg.md +132 -142
- package/.docs/organized/code-examples/with-langgraph.md +234 -228
- package/.docs/organized/code-examples/with-parent-id-grouping.md +149 -154
- package/.docs/organized/code-examples/with-react-hook-form.md +149 -155
- package/.docs/organized/code-examples/{store-example.md → with-store.md} +181 -157
- package/.docs/organized/code-examples/with-tanstack.md +31 -45
- package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +36 -0
- package/.docs/raw/docs/runtimes/custom/local.mdx +31 -8
- package/.docs/raw/docs/ui/Scrollbar.mdx +0 -6
- 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 +122 -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/dist/chunk-M2RKUM66.js +0 -38
- package/dist/chunk-NVNFQ5ZO.js +0 -423
|
@@ -86,43 +86,41 @@ export const OPTIONS = () => {
|
|
|
86
86
|
@custom-variant dark (&:is(.dark *));
|
|
87
87
|
|
|
88
88
|
@theme inline {
|
|
89
|
-
--color-background: var(--background);
|
|
90
|
-
--color-foreground: var(--foreground);
|
|
91
|
-
--font-sans: var(--font-geist-sans);
|
|
92
|
-
--font-mono: var(--font-geist-mono);
|
|
93
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
94
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
95
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
96
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
97
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
98
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
99
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
100
|
-
--color-sidebar: var(--sidebar);
|
|
101
|
-
--color-chart-5: var(--chart-5);
|
|
102
|
-
--color-chart-4: var(--chart-4);
|
|
103
|
-
--color-chart-3: var(--chart-3);
|
|
104
|
-
--color-chart-2: var(--chart-2);
|
|
105
|
-
--color-chart-1: var(--chart-1);
|
|
106
|
-
--color-ring: var(--ring);
|
|
107
|
-
--color-input: var(--input);
|
|
108
|
-
--color-border: var(--border);
|
|
109
|
-
--color-destructive: var(--destructive);
|
|
110
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
111
|
-
--color-accent: var(--accent);
|
|
112
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
113
|
-
--color-muted: var(--muted);
|
|
114
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
115
|
-
--color-secondary: var(--secondary);
|
|
116
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
117
|
-
--color-primary: var(--primary);
|
|
118
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
119
|
-
--color-popover: var(--popover);
|
|
120
|
-
--color-card-foreground: var(--card-foreground);
|
|
121
|
-
--color-card: var(--card);
|
|
122
89
|
--radius-sm: calc(var(--radius) - 4px);
|
|
123
90
|
--radius-md: calc(var(--radius) - 2px);
|
|
124
91
|
--radius-lg: var(--radius);
|
|
125
92
|
--radius-xl: calc(var(--radius) + 4px);
|
|
93
|
+
--color-background: var(--background);
|
|
94
|
+
--color-foreground: var(--foreground);
|
|
95
|
+
--color-card: var(--card);
|
|
96
|
+
--color-card-foreground: var(--card-foreground);
|
|
97
|
+
--color-popover: var(--popover);
|
|
98
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
99
|
+
--color-primary: var(--primary);
|
|
100
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
101
|
+
--color-secondary: var(--secondary);
|
|
102
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
103
|
+
--color-muted: var(--muted);
|
|
104
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
105
|
+
--color-accent: var(--accent);
|
|
106
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
107
|
+
--color-destructive: var(--destructive);
|
|
108
|
+
--color-border: var(--border);
|
|
109
|
+
--color-input: var(--input);
|
|
110
|
+
--color-ring: var(--ring);
|
|
111
|
+
--color-chart-1: var(--chart-1);
|
|
112
|
+
--color-chart-2: var(--chart-2);
|
|
113
|
+
--color-chart-3: var(--chart-3);
|
|
114
|
+
--color-chart-4: var(--chart-4);
|
|
115
|
+
--color-chart-5: var(--chart-5);
|
|
116
|
+
--color-sidebar: var(--sidebar);
|
|
117
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
118
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
119
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
120
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
121
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
122
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
123
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
126
124
|
}
|
|
127
125
|
|
|
128
126
|
:root {
|
|
@@ -329,8 +327,12 @@ export default function Home() {
|
|
|
329
327
|
},
|
|
330
328
|
"aliases": {
|
|
331
329
|
"components": "@/components",
|
|
332
|
-
"utils": "@/lib/utils"
|
|
333
|
-
|
|
330
|
+
"utils": "@/lib/utils",
|
|
331
|
+
"ui": "@/components/ui",
|
|
332
|
+
"lib": "@/lib",
|
|
333
|
+
"hooks": "@/hooks"
|
|
334
|
+
},
|
|
335
|
+
"iconLibrary": "lucide"
|
|
334
336
|
}
|
|
335
337
|
|
|
336
338
|
```
|
|
@@ -971,7 +973,7 @@ const ThreadScrollToBottom: FC = () => {
|
|
|
971
973
|
<TooltipIconButton
|
|
972
974
|
tooltip="Scroll to bottom"
|
|
973
975
|
variant="outline"
|
|
974
|
-
className="aui-thread-scroll-to-bottom -top-12
|
|
976
|
+
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"
|
|
975
977
|
>
|
|
976
978
|
<ArrowDownIcon />
|
|
977
979
|
</TooltipIconButton>
|
|
@@ -1135,7 +1137,7 @@ const AssistantActionBar: FC = () => {
|
|
|
1135
1137
|
hideWhenRunning
|
|
1136
1138
|
autohide="not-last"
|
|
1137
1139
|
autohideFloat="single-branch"
|
|
1138
|
-
className="aui-assistant-action-bar-root
|
|
1140
|
+
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"
|
|
1139
1141
|
>
|
|
1140
1142
|
<ActionBarPrimitive.Copy asChild>
|
|
1141
1143
|
<TooltipIconButton tooltip="Copy">
|
|
@@ -1173,12 +1175,12 @@ const UserMessage: FC = () => {
|
|
|
1173
1175
|
<div className="aui-user-message-content wrap-break-word rounded-2xl bg-muted px-4 py-2.5 text-foreground">
|
|
1174
1176
|
<MessagePrimitive.Parts />
|
|
1175
1177
|
</div>
|
|
1176
|
-
<div className="aui-user-action-bar-wrapper -translate-x-full -translate-y-1/2
|
|
1178
|
+
<div className="aui-user-action-bar-wrapper absolute top-1/2 left-0 -translate-x-full -translate-y-1/2 pr-2">
|
|
1177
1179
|
<UserActionBar />
|
|
1178
1180
|
</div>
|
|
1179
1181
|
</div>
|
|
1180
1182
|
|
|
1181
|
-
<BranchPicker className="aui-user-branch-picker
|
|
1183
|
+
<BranchPicker className="aui-user-branch-picker col-span-full col-start-1 row-start-3 -mr-1 justify-end" />
|
|
1182
1184
|
</MessagePrimitive.Root>
|
|
1183
1185
|
);
|
|
1184
1186
|
};
|
|
@@ -1230,7 +1232,7 @@ const BranchPicker: FC<BranchPickerPrimitive.Root.Props> = ({
|
|
|
1230
1232
|
<BranchPickerPrimitive.Root
|
|
1231
1233
|
hideWhenSingleBranch
|
|
1232
1234
|
className={cn(
|
|
1233
|
-
"aui-branch-picker-root -
|
|
1235
|
+
"aui-branch-picker-root mr-2 -ml-2 inline-flex items-center text-muted-foreground text-xs",
|
|
1234
1236
|
className,
|
|
1235
1237
|
)}
|
|
1236
1238
|
{...rest}
|
|
@@ -1749,47 +1751,50 @@ import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
|
1749
1751
|
|
|
1750
1752
|
import { cn } from "@/lib/utils";
|
|
1751
1753
|
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
)
|
|
1792
|
-
|
|
1754
|
+
function Avatar({
|
|
1755
|
+
className,
|
|
1756
|
+
...props
|
|
1757
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
|
|
1758
|
+
return (
|
|
1759
|
+
<AvatarPrimitive.Root
|
|
1760
|
+
data-slot="avatar"
|
|
1761
|
+
className={cn(
|
|
1762
|
+
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
1763
|
+
className,
|
|
1764
|
+
)}
|
|
1765
|
+
{...props}
|
|
1766
|
+
/>
|
|
1767
|
+
);
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
function AvatarImage({
|
|
1771
|
+
className,
|
|
1772
|
+
...props
|
|
1773
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
|
1774
|
+
return (
|
|
1775
|
+
<AvatarPrimitive.Image
|
|
1776
|
+
data-slot="avatar-image"
|
|
1777
|
+
className={cn("aspect-square size-full", className)}
|
|
1778
|
+
{...props}
|
|
1779
|
+
/>
|
|
1780
|
+
);
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
function AvatarFallback({
|
|
1784
|
+
className,
|
|
1785
|
+
...props
|
|
1786
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
|
|
1787
|
+
return (
|
|
1788
|
+
<AvatarPrimitive.Fallback
|
|
1789
|
+
data-slot="avatar-fallback"
|
|
1790
|
+
className={cn(
|
|
1791
|
+
"flex size-full items-center justify-center rounded-full bg-muted",
|
|
1792
|
+
className,
|
|
1793
|
+
)}
|
|
1794
|
+
{...props}
|
|
1795
|
+
/>
|
|
1796
|
+
);
|
|
1797
|
+
}
|
|
1793
1798
|
|
|
1794
1799
|
export { Avatar, AvatarImage, AvatarFallback };
|
|
1795
1800
|
|
|
@@ -1805,26 +1810,28 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
1805
1810
|
import { cn } from "@/lib/utils";
|
|
1806
1811
|
|
|
1807
1812
|
const buttonVariants = cva(
|
|
1808
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm transition-
|
|
1813
|
+
"inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
1809
1814
|
{
|
|
1810
1815
|
variants: {
|
|
1811
1816
|
variant: {
|
|
1812
|
-
default:
|
|
1813
|
-
"bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
1817
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
1814
1818
|
destructive:
|
|
1815
|
-
"bg-destructive text-destructive
|
|
1819
|
+
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
1816
1820
|
outline:
|
|
1817
|
-
"border
|
|
1821
|
+
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
1818
1822
|
secondary:
|
|
1819
|
-
"bg-secondary text-secondary-foreground
|
|
1820
|
-
ghost:
|
|
1823
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1824
|
+
ghost:
|
|
1825
|
+
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
1821
1826
|
link: "text-primary underline-offset-4 hover:underline",
|
|
1822
1827
|
},
|
|
1823
1828
|
size: {
|
|
1824
|
-
default: "h-9 px-4 py-2",
|
|
1825
|
-
sm: "h-8 rounded-md px-3
|
|
1826
|
-
lg: "h-10 rounded-md px-
|
|
1827
|
-
icon: "
|
|
1829
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
1830
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
1831
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
1832
|
+
icon: "size-9",
|
|
1833
|
+
"icon-sm": "size-8",
|
|
1834
|
+
"icon-lg": "size-10",
|
|
1828
1835
|
},
|
|
1829
1836
|
},
|
|
1830
1837
|
defaultVariants: {
|
|
@@ -1834,25 +1841,28 @@ const buttonVariants = cva(
|
|
|
1834
1841
|
},
|
|
1835
1842
|
);
|
|
1836
1843
|
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1844
|
+
function Button({
|
|
1845
|
+
className,
|
|
1846
|
+
variant = "default",
|
|
1847
|
+
size = "default",
|
|
1848
|
+
asChild = false,
|
|
1849
|
+
...props
|
|
1850
|
+
}: React.ComponentProps<"button"> &
|
|
1851
|
+
VariantProps<typeof buttonVariants> & {
|
|
1852
|
+
asChild?: boolean;
|
|
1853
|
+
}) {
|
|
1854
|
+
const Comp = asChild ? Slot : "button";
|
|
1842
1855
|
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
},
|
|
1854
|
-
);
|
|
1855
|
-
Button.displayName = "Button";
|
|
1856
|
+
return (
|
|
1857
|
+
<Comp
|
|
1858
|
+
data-slot="button"
|
|
1859
|
+
data-variant={variant}
|
|
1860
|
+
data-size={size}
|
|
1861
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
1862
|
+
{...props}
|
|
1863
|
+
/>
|
|
1864
|
+
);
|
|
1865
|
+
}
|
|
1856
1866
|
|
|
1857
1867
|
export { Button, buttonVariants };
|
|
1858
1868
|
|
|
@@ -1865,82 +1875,91 @@ import * as React from "react";
|
|
|
1865
1875
|
|
|
1866
1876
|
import { cn } from "@/lib/utils";
|
|
1867
1877
|
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
)
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
)
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
CardFooter
|
|
1878
|
+
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
1879
|
+
return (
|
|
1880
|
+
<div
|
|
1881
|
+
data-slot="card"
|
|
1882
|
+
className={cn(
|
|
1883
|
+
"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",
|
|
1884
|
+
className,
|
|
1885
|
+
)}
|
|
1886
|
+
{...props}
|
|
1887
|
+
/>
|
|
1888
|
+
);
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
1892
|
+
return (
|
|
1893
|
+
<div
|
|
1894
|
+
data-slot="card-header"
|
|
1895
|
+
className={cn(
|
|
1896
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
1897
|
+
className,
|
|
1898
|
+
)}
|
|
1899
|
+
{...props}
|
|
1900
|
+
/>
|
|
1901
|
+
);
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
1905
|
+
return (
|
|
1906
|
+
<div
|
|
1907
|
+
data-slot="card-title"
|
|
1908
|
+
className={cn("font-semibold leading-none", className)}
|
|
1909
|
+
{...props}
|
|
1910
|
+
/>
|
|
1911
|
+
);
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
1915
|
+
return (
|
|
1916
|
+
<div
|
|
1917
|
+
data-slot="card-description"
|
|
1918
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
1919
|
+
{...props}
|
|
1920
|
+
/>
|
|
1921
|
+
);
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
1925
|
+
return (
|
|
1926
|
+
<div
|
|
1927
|
+
data-slot="card-action"
|
|
1928
|
+
className={cn(
|
|
1929
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
1930
|
+
className,
|
|
1931
|
+
)}
|
|
1932
|
+
{...props}
|
|
1933
|
+
/>
|
|
1934
|
+
);
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
1938
|
+
return (
|
|
1939
|
+
<div
|
|
1940
|
+
data-slot="card-content"
|
|
1941
|
+
className={cn("px-6", className)}
|
|
1942
|
+
{...props}
|
|
1943
|
+
/>
|
|
1944
|
+
);
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
1948
|
+
return (
|
|
1949
|
+
<div
|
|
1950
|
+
data-slot="card-footer"
|
|
1951
|
+
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
|
1952
|
+
{...props}
|
|
1953
|
+
/>
|
|
1954
|
+
);
|
|
1955
|
+
}
|
|
1938
1956
|
|
|
1939
1957
|
export {
|
|
1940
1958
|
Card,
|
|
1941
1959
|
CardHeader,
|
|
1942
1960
|
CardFooter,
|
|
1943
1961
|
CardTitle,
|
|
1962
|
+
CardAction,
|
|
1944
1963
|
CardDescription,
|
|
1945
1964
|
CardContent,
|
|
1946
1965
|
};
|
|
@@ -1990,7 +2009,7 @@ function DialogOverlay({
|
|
|
1990
2009
|
<DialogPrimitive.Overlay
|
|
1991
2010
|
data-slot="dialog-overlay"
|
|
1992
2011
|
className={cn(
|
|
1993
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/
|
|
2012
|
+
"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",
|
|
1994
2013
|
className,
|
|
1995
2014
|
)}
|
|
1996
2015
|
{...props}
|
|
@@ -2001,24 +2020,32 @@ function DialogOverlay({
|
|
|
2001
2020
|
function DialogContent({
|
|
2002
2021
|
className,
|
|
2003
2022
|
children,
|
|
2023
|
+
showCloseButton = true,
|
|
2004
2024
|
...props
|
|
2005
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content>
|
|
2025
|
+
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
2026
|
+
showCloseButton?: boolean;
|
|
2027
|
+
}) {
|
|
2006
2028
|
return (
|
|
2007
2029
|
<DialogPortal data-slot="dialog-portal">
|
|
2008
2030
|
<DialogOverlay />
|
|
2009
2031
|
<DialogPrimitive.Content
|
|
2010
2032
|
data-slot="dialog-content"
|
|
2011
2033
|
className={cn(
|
|
2012
|
-
"data-[state=closed]:fade-out-0 data-[state=
|
|
2034
|
+
"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",
|
|
2013
2035
|
className,
|
|
2014
2036
|
)}
|
|
2015
2037
|
{...props}
|
|
2016
2038
|
>
|
|
2017
2039
|
{children}
|
|
2018
|
-
|
|
2019
|
-
<
|
|
2020
|
-
|
|
2021
|
-
|
|
2040
|
+
{showCloseButton && (
|
|
2041
|
+
<DialogPrimitive.Close
|
|
2042
|
+
data-slot="dialog-close"
|
|
2043
|
+
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"
|
|
2044
|
+
>
|
|
2045
|
+
<XIcon />
|
|
2046
|
+
<span className="sr-only">Close</span>
|
|
2047
|
+
</DialogPrimitive.Close>
|
|
2048
|
+
)}
|
|
2022
2049
|
</DialogPrimitive.Content>
|
|
2023
2050
|
</DialogPortal>
|
|
2024
2051
|
);
|
|
@@ -2158,13 +2185,13 @@ function TooltipContent({
|
|
|
2158
2185
|
data-slot="tooltip-content"
|
|
2159
2186
|
sideOffset={sideOffset}
|
|
2160
2187
|
className={cn(
|
|
2161
|
-
"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-
|
|
2188
|
+
"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",
|
|
2162
2189
|
className,
|
|
2163
2190
|
)}
|
|
2164
2191
|
{...props}
|
|
2165
2192
|
>
|
|
2166
2193
|
{children}
|
|
2167
|
-
<TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-
|
|
2194
|
+
<TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />
|
|
2168
2195
|
</TooltipPrimitive.Content>
|
|
2169
2196
|
</TooltipPrimitive.Portal>
|
|
2170
2197
|
);
|
|
@@ -2288,10 +2315,11 @@ export default nextConfig;
|
|
|
2288
2315
|
```json
|
|
2289
2316
|
{
|
|
2290
2317
|
"name": "with-langgraph",
|
|
2291
|
-
"version": "0.
|
|
2318
|
+
"version": "0.0.0",
|
|
2292
2319
|
"private": true,
|
|
2320
|
+
"type": "module",
|
|
2293
2321
|
"scripts": {
|
|
2294
|
-
"dev": "next dev
|
|
2322
|
+
"dev": "next dev",
|
|
2295
2323
|
"build": "next build",
|
|
2296
2324
|
"start": "next start"
|
|
2297
2325
|
},
|
|
@@ -2299,34 +2327,30 @@ export default nextConfig;
|
|
|
2299
2327
|
"@assistant-ui/react": "workspace:*",
|
|
2300
2328
|
"@assistant-ui/react-langgraph": "workspace:*",
|
|
2301
2329
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
2302
|
-
"@langchain/langgraph-sdk": "^1.
|
|
2330
|
+
"@langchain/langgraph-sdk": "^1.3.1",
|
|
2303
2331
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
2304
2332
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
2305
2333
|
"@radix-ui/react-slot": "^1.2.4",
|
|
2306
2334
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
2307
2335
|
"class-variance-authority": "^0.7.1",
|
|
2308
2336
|
"clsx": "^2.1.1",
|
|
2309
|
-
"
|
|
2310
|
-
"
|
|
2311
|
-
"
|
|
2312
|
-
"
|
|
2313
|
-
"next": "16.0.7",
|
|
2314
|
-
"react": "19.2.1",
|
|
2315
|
-
"react-dom": "19.2.1",
|
|
2337
|
+
"lucide-react": "^0.562.0",
|
|
2338
|
+
"next": "16.1.0",
|
|
2339
|
+
"react": "19.2.3",
|
|
2340
|
+
"react-dom": "19.2.3",
|
|
2316
2341
|
"remark-gfm": "^4.0.1",
|
|
2317
2342
|
"tailwind-merge": "^3.4.0",
|
|
2318
|
-
"tw-animate-css": "^1.4.0",
|
|
2319
2343
|
"zustand": "^5.0.9"
|
|
2320
2344
|
},
|
|
2321
2345
|
"devDependencies": {
|
|
2322
2346
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
2323
|
-
"@
|
|
2324
|
-
"@types/
|
|
2325
|
-
"@types/
|
|
2326
|
-
"@types/react": "^19",
|
|
2327
|
-
"
|
|
2328
|
-
"
|
|
2329
|
-
"
|
|
2347
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
2348
|
+
"@types/node": "^25.0.3",
|
|
2349
|
+
"@types/react": "^19.2.7",
|
|
2350
|
+
"@types/react-dom": "^19.2.3",
|
|
2351
|
+
"postcss": "^8.5.6",
|
|
2352
|
+
"tailwindcss": "^4.1.18",
|
|
2353
|
+
"tw-animate-css": "^1.4.0",
|
|
2330
2354
|
"typescript": "^5.9.3"
|
|
2331
2355
|
}
|
|
2332
2356
|
}
|
|
@@ -2364,29 +2388,11 @@ npm run dev
|
|
|
2364
2388
|
|
|
2365
2389
|
```json
|
|
2366
2390
|
{
|
|
2367
|
-
"extends": "@assistant-ui/x-buildutils/ts/
|
|
2391
|
+
"extends": "@assistant-ui/x-buildutils/ts/next",
|
|
2368
2392
|
"compilerOptions": {
|
|
2369
|
-
"
|
|
2370
|
-
"module": "ESNext",
|
|
2371
|
-
"incremental": true,
|
|
2372
|
-
"plugins": [
|
|
2373
|
-
{
|
|
2374
|
-
"name": "next"
|
|
2375
|
-
}
|
|
2376
|
-
],
|
|
2377
|
-
"allowJs": true,
|
|
2378
|
-
"strictNullChecks": true,
|
|
2379
|
-
"jsx": "preserve",
|
|
2380
|
-
"paths": {
|
|
2381
|
-
"@/*": ["./*"],
|
|
2382
|
-
"@assistant-ui/*": ["../../packages/*/src"],
|
|
2383
|
-
"@assistant-ui/react/*": ["../../packages/react/src/*"],
|
|
2384
|
-
"@assistant-ui/tap/*": ["../../packages/tap/src/*"],
|
|
2385
|
-
"assistant-stream": ["../../packages/assistant-stream/src"],
|
|
2386
|
-
"assistant-stream/*": ["../../packages/assistant-stream/src/*"]
|
|
2387
|
-
}
|
|
2393
|
+
"paths": { "@/*": ["./*"] }
|
|
2388
2394
|
},
|
|
2389
|
-
"include": ["
|
|
2395
|
+
"include": ["**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
2390
2396
|
"exclude": ["node_modules"]
|
|
2391
2397
|
}
|
|
2392
2398
|
|