@assistant-ui/mcp-docs-server 0.1.17 → 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 +146 -152
- package/.docs/organized/code-examples/with-ai-sdk-v5.md +96 -101
- package/.docs/organized/code-examples/with-assistant-transport.md +132 -220
- package/.docs/organized/code-examples/with-cloud.md +124 -131
- package/.docs/organized/code-examples/with-custom-thread-list.md +26 -46
- package/.docs/organized/code-examples/with-external-store.md +146 -151
- package/.docs/organized/code-examples/with-ffmpeg.md +129 -139
- package/.docs/organized/code-examples/with-langgraph.md +231 -225
- package/.docs/organized/code-examples/with-parent-id-grouping.md +146 -151
- package/.docs/organized/code-examples/with-react-hook-form.md +146 -152
- package/.docs/organized/code-examples/{store-example.md → with-store.md} +16 -20
- package/.docs/organized/code-examples/with-tanstack.md +23 -41
- 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
|
@@ -35,43 +35,41 @@ export async function POST(req: Request) {
|
|
|
35
35
|
@custom-variant dark (&:is(.dark *));
|
|
36
36
|
|
|
37
37
|
@theme inline {
|
|
38
|
-
--color-background: var(--background);
|
|
39
|
-
--color-foreground: var(--foreground);
|
|
40
|
-
--font-sans: var(--font-geist-sans);
|
|
41
|
-
--font-mono: var(--font-geist-mono);
|
|
42
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
43
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
44
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
45
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
46
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
47
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
48
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
49
|
-
--color-sidebar: var(--sidebar);
|
|
50
|
-
--color-chart-5: var(--chart-5);
|
|
51
|
-
--color-chart-4: var(--chart-4);
|
|
52
|
-
--color-chart-3: var(--chart-3);
|
|
53
|
-
--color-chart-2: var(--chart-2);
|
|
54
|
-
--color-chart-1: var(--chart-1);
|
|
55
|
-
--color-ring: var(--ring);
|
|
56
|
-
--color-input: var(--input);
|
|
57
|
-
--color-border: var(--border);
|
|
58
|
-
--color-destructive: var(--destructive);
|
|
59
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
60
|
-
--color-accent: var(--accent);
|
|
61
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
62
|
-
--color-muted: var(--muted);
|
|
63
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
64
|
-
--color-secondary: var(--secondary);
|
|
65
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
66
|
-
--color-primary: var(--primary);
|
|
67
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
68
|
-
--color-popover: var(--popover);
|
|
69
|
-
--color-card-foreground: var(--card-foreground);
|
|
70
|
-
--color-card: var(--card);
|
|
71
38
|
--radius-sm: calc(var(--radius) - 4px);
|
|
72
39
|
--radius-md: calc(var(--radius) - 2px);
|
|
73
40
|
--radius-lg: var(--radius);
|
|
74
41
|
--radius-xl: calc(var(--radius) + 4px);
|
|
42
|
+
--color-background: var(--background);
|
|
43
|
+
--color-foreground: var(--foreground);
|
|
44
|
+
--color-card: var(--card);
|
|
45
|
+
--color-card-foreground: var(--card-foreground);
|
|
46
|
+
--color-popover: var(--popover);
|
|
47
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
48
|
+
--color-primary: var(--primary);
|
|
49
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
50
|
+
--color-secondary: var(--secondary);
|
|
51
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
52
|
+
--color-muted: var(--muted);
|
|
53
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
54
|
+
--color-accent: var(--accent);
|
|
55
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
56
|
+
--color-destructive: var(--destructive);
|
|
57
|
+
--color-border: var(--border);
|
|
58
|
+
--color-input: var(--input);
|
|
59
|
+
--color-ring: var(--ring);
|
|
60
|
+
--color-chart-1: var(--chart-1);
|
|
61
|
+
--color-chart-2: var(--chart-2);
|
|
62
|
+
--color-chart-3: var(--chart-3);
|
|
63
|
+
--color-chart-4: var(--chart-4);
|
|
64
|
+
--color-chart-5: var(--chart-5);
|
|
65
|
+
--color-sidebar: var(--sidebar);
|
|
66
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
67
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
68
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
69
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
70
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
71
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
72
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
75
73
|
}
|
|
76
74
|
|
|
77
75
|
:root {
|
|
@@ -307,8 +305,12 @@ export default function Home() {
|
|
|
307
305
|
},
|
|
308
306
|
"aliases": {
|
|
309
307
|
"components": "@/components",
|
|
310
|
-
"utils": "@/lib/utils"
|
|
311
|
-
|
|
308
|
+
"utils": "@/lib/utils",
|
|
309
|
+
"ui": "@/components/ui",
|
|
310
|
+
"lib": "@/lib",
|
|
311
|
+
"hooks": "@/hooks"
|
|
312
|
+
},
|
|
313
|
+
"iconLibrary": "lucide"
|
|
312
314
|
}
|
|
313
315
|
|
|
314
316
|
```
|
|
@@ -316,24 +318,20 @@ export default function Home() {
|
|
|
316
318
|
## components/assistant-ui/assistant-sidebar.tsx
|
|
317
319
|
|
|
318
320
|
```tsx
|
|
319
|
-
import {
|
|
320
|
-
ResizableHandle,
|
|
321
|
-
ResizablePanel,
|
|
322
|
-
ResizablePanelGroup,
|
|
323
|
-
} from "@/components/ui/resizable";
|
|
321
|
+
import { Separator, ResizablePanel, Group } from "@/components/ui/resizable";
|
|
324
322
|
import type { FC, PropsWithChildren } from "react";
|
|
325
323
|
|
|
326
324
|
import { Thread } from "@/components/assistant-ui/thread";
|
|
327
325
|
|
|
328
326
|
export const AssistantSidebar: FC<PropsWithChildren> = ({ children }) => {
|
|
329
327
|
return (
|
|
330
|
-
<
|
|
328
|
+
<Group orientation="horizontal">
|
|
331
329
|
<ResizablePanel>{children}</ResizablePanel>
|
|
332
|
-
<
|
|
330
|
+
<Separator />
|
|
333
331
|
<ResizablePanel>
|
|
334
332
|
<Thread />
|
|
335
333
|
</ResizablePanel>
|
|
336
|
-
</
|
|
334
|
+
</Group>
|
|
337
335
|
);
|
|
338
336
|
};
|
|
339
337
|
|
|
@@ -889,7 +887,7 @@ const ThreadScrollToBottom: FC = () => {
|
|
|
889
887
|
<TooltipIconButton
|
|
890
888
|
tooltip="Scroll to bottom"
|
|
891
889
|
variant="outline"
|
|
892
|
-
className="aui-thread-scroll-to-bottom -top-12
|
|
890
|
+
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"
|
|
893
891
|
>
|
|
894
892
|
<ArrowDownIcon />
|
|
895
893
|
</TooltipIconButton>
|
|
@@ -1053,7 +1051,7 @@ const AssistantActionBar: FC = () => {
|
|
|
1053
1051
|
hideWhenRunning
|
|
1054
1052
|
autohide="not-last"
|
|
1055
1053
|
autohideFloat="single-branch"
|
|
1056
|
-
className="aui-assistant-action-bar-root
|
|
1054
|
+
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"
|
|
1057
1055
|
>
|
|
1058
1056
|
<ActionBarPrimitive.Copy asChild>
|
|
1059
1057
|
<TooltipIconButton tooltip="Copy">
|
|
@@ -1091,12 +1089,12 @@ const UserMessage: FC = () => {
|
|
|
1091
1089
|
<div className="aui-user-message-content wrap-break-word rounded-2xl bg-muted px-4 py-2.5 text-foreground">
|
|
1092
1090
|
<MessagePrimitive.Parts />
|
|
1093
1091
|
</div>
|
|
1094
|
-
<div className="aui-user-action-bar-wrapper -translate-x-full -translate-y-1/2
|
|
1092
|
+
<div className="aui-user-action-bar-wrapper absolute top-1/2 left-0 -translate-x-full -translate-y-1/2 pr-2">
|
|
1095
1093
|
<UserActionBar />
|
|
1096
1094
|
</div>
|
|
1097
1095
|
</div>
|
|
1098
1096
|
|
|
1099
|
-
<BranchPicker className="aui-user-branch-picker
|
|
1097
|
+
<BranchPicker className="aui-user-branch-picker col-span-full col-start-1 row-start-3 -mr-1 justify-end" />
|
|
1100
1098
|
</MessagePrimitive.Root>
|
|
1101
1099
|
);
|
|
1102
1100
|
};
|
|
@@ -1148,7 +1146,7 @@ const BranchPicker: FC<BranchPickerPrimitive.Root.Props> = ({
|
|
|
1148
1146
|
<BranchPickerPrimitive.Root
|
|
1149
1147
|
hideWhenSingleBranch
|
|
1150
1148
|
className={cn(
|
|
1151
|
-
"aui-branch-picker-root -
|
|
1149
|
+
"aui-branch-picker-root mr-2 -ml-2 inline-flex items-center text-muted-foreground text-xs",
|
|
1152
1150
|
className,
|
|
1153
1151
|
)}
|
|
1154
1152
|
{...rest}
|
|
@@ -1478,47 +1476,50 @@ import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
|
1478
1476
|
|
|
1479
1477
|
import { cn } from "@/lib/utils";
|
|
1480
1478
|
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
)
|
|
1521
|
-
|
|
1479
|
+
function Avatar({
|
|
1480
|
+
className,
|
|
1481
|
+
...props
|
|
1482
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
|
|
1483
|
+
return (
|
|
1484
|
+
<AvatarPrimitive.Root
|
|
1485
|
+
data-slot="avatar"
|
|
1486
|
+
className={cn(
|
|
1487
|
+
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
1488
|
+
className,
|
|
1489
|
+
)}
|
|
1490
|
+
{...props}
|
|
1491
|
+
/>
|
|
1492
|
+
);
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
function AvatarImage({
|
|
1496
|
+
className,
|
|
1497
|
+
...props
|
|
1498
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
|
1499
|
+
return (
|
|
1500
|
+
<AvatarPrimitive.Image
|
|
1501
|
+
data-slot="avatar-image"
|
|
1502
|
+
className={cn("aspect-square size-full", className)}
|
|
1503
|
+
{...props}
|
|
1504
|
+
/>
|
|
1505
|
+
);
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
function AvatarFallback({
|
|
1509
|
+
className,
|
|
1510
|
+
...props
|
|
1511
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
|
|
1512
|
+
return (
|
|
1513
|
+
<AvatarPrimitive.Fallback
|
|
1514
|
+
data-slot="avatar-fallback"
|
|
1515
|
+
className={cn(
|
|
1516
|
+
"flex size-full items-center justify-center rounded-full bg-muted",
|
|
1517
|
+
className,
|
|
1518
|
+
)}
|
|
1519
|
+
{...props}
|
|
1520
|
+
/>
|
|
1521
|
+
);
|
|
1522
|
+
}
|
|
1522
1523
|
|
|
1523
1524
|
export { Avatar, AvatarImage, AvatarFallback };
|
|
1524
1525
|
|
|
@@ -1538,14 +1539,13 @@ const buttonVariants = cva(
|
|
|
1538
1539
|
{
|
|
1539
1540
|
variants: {
|
|
1540
1541
|
variant: {
|
|
1541
|
-
default:
|
|
1542
|
-
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
1542
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
1543
1543
|
destructive:
|
|
1544
|
-
"bg-destructive text-white
|
|
1544
|
+
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
1545
1545
|
outline:
|
|
1546
1546
|
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
1547
1547
|
secondary:
|
|
1548
|
-
"bg-secondary text-secondary-foreground
|
|
1548
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1549
1549
|
ghost:
|
|
1550
1550
|
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
1551
1551
|
link: "text-primary underline-offset-4 hover:underline",
|
|
@@ -1555,6 +1555,8 @@ const buttonVariants = cva(
|
|
|
1555
1555
|
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
1556
1556
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
1557
1557
|
icon: "size-9",
|
|
1558
|
+
"icon-sm": "size-8",
|
|
1559
|
+
"icon-lg": "size-10",
|
|
1558
1560
|
},
|
|
1559
1561
|
},
|
|
1560
1562
|
defaultVariants: {
|
|
@@ -1566,8 +1568,8 @@ const buttonVariants = cva(
|
|
|
1566
1568
|
|
|
1567
1569
|
function Button({
|
|
1568
1570
|
className,
|
|
1569
|
-
variant,
|
|
1570
|
-
size,
|
|
1571
|
+
variant = "default",
|
|
1572
|
+
size = "default",
|
|
1571
1573
|
asChild = false,
|
|
1572
1574
|
...props
|
|
1573
1575
|
}: React.ComponentProps<"button"> &
|
|
@@ -1579,6 +1581,8 @@ function Button({
|
|
|
1579
1581
|
return (
|
|
1580
1582
|
<Comp
|
|
1581
1583
|
data-slot="button"
|
|
1584
|
+
data-variant={variant}
|
|
1585
|
+
data-size={size}
|
|
1582
1586
|
className={cn(buttonVariants({ variant, size, className }))}
|
|
1583
1587
|
{...props}
|
|
1584
1588
|
/>
|
|
@@ -1632,7 +1636,7 @@ function DialogOverlay({
|
|
|
1632
1636
|
<DialogPrimitive.Overlay
|
|
1633
1637
|
data-slot="dialog-overlay"
|
|
1634
1638
|
className={cn(
|
|
1635
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/
|
|
1639
|
+
"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",
|
|
1636
1640
|
className,
|
|
1637
1641
|
)}
|
|
1638
1642
|
{...props}
|
|
@@ -1643,24 +1647,32 @@ function DialogOverlay({
|
|
|
1643
1647
|
function DialogContent({
|
|
1644
1648
|
className,
|
|
1645
1649
|
children,
|
|
1650
|
+
showCloseButton = true,
|
|
1646
1651
|
...props
|
|
1647
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content>
|
|
1652
|
+
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
1653
|
+
showCloseButton?: boolean;
|
|
1654
|
+
}) {
|
|
1648
1655
|
return (
|
|
1649
1656
|
<DialogPortal data-slot="dialog-portal">
|
|
1650
1657
|
<DialogOverlay />
|
|
1651
1658
|
<DialogPrimitive.Content
|
|
1652
1659
|
data-slot="dialog-content"
|
|
1653
1660
|
className={cn(
|
|
1654
|
-
"data-[state=closed]:fade-out-0 data-[state=
|
|
1661
|
+
"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",
|
|
1655
1662
|
className,
|
|
1656
1663
|
)}
|
|
1657
1664
|
{...props}
|
|
1658
1665
|
>
|
|
1659
1666
|
{children}
|
|
1660
|
-
|
|
1661
|
-
<
|
|
1662
|
-
|
|
1663
|
-
|
|
1667
|
+
{showCloseButton && (
|
|
1668
|
+
<DialogPrimitive.Close
|
|
1669
|
+
data-slot="dialog-close"
|
|
1670
|
+
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"
|
|
1671
|
+
>
|
|
1672
|
+
<XIcon />
|
|
1673
|
+
<span className="sr-only">Close</span>
|
|
1674
|
+
</DialogPrimitive.Close>
|
|
1675
|
+
)}
|
|
1664
1676
|
</DialogPrimitive.Content>
|
|
1665
1677
|
</DialogPortal>
|
|
1666
1678
|
);
|
|
@@ -1736,7 +1748,7 @@ export {
|
|
|
1736
1748
|
"use client";
|
|
1737
1749
|
|
|
1738
1750
|
import * as React from "react";
|
|
1739
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
1751
|
+
import type * as LabelPrimitive from "@radix-ui/react-label";
|
|
1740
1752
|
import { Slot } from "@radix-ui/react-slot";
|
|
1741
1753
|
import {
|
|
1742
1754
|
Controller,
|
|
@@ -1917,7 +1929,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
|
1917
1929
|
type={type}
|
|
1918
1930
|
data-slot="input"
|
|
1919
1931
|
className={cn(
|
|
1920
|
-
"
|
|
1932
|
+
"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
|
|
1921
1933
|
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
1922
1934
|
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
1923
1935
|
className,
|
|
@@ -1972,12 +1984,12 @@ import * as ResizablePrimitive from "react-resizable-panels";
|
|
|
1972
1984
|
|
|
1973
1985
|
import { cn } from "@/lib/utils";
|
|
1974
1986
|
|
|
1975
|
-
function
|
|
1987
|
+
function Group({
|
|
1976
1988
|
className,
|
|
1977
1989
|
...props
|
|
1978
|
-
}: React.ComponentProps<typeof ResizablePrimitive.
|
|
1990
|
+
}: React.ComponentProps<typeof ResizablePrimitive.Group>) {
|
|
1979
1991
|
return (
|
|
1980
|
-
<ResizablePrimitive.
|
|
1992
|
+
<ResizablePrimitive.Group
|
|
1981
1993
|
data-slot="resizable-panel-group"
|
|
1982
1994
|
className={cn(
|
|
1983
1995
|
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
@@ -1994,18 +2006,18 @@ function ResizablePanel({
|
|
|
1994
2006
|
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
|
|
1995
2007
|
}
|
|
1996
2008
|
|
|
1997
|
-
function
|
|
2009
|
+
function Separator({
|
|
1998
2010
|
withHandle,
|
|
1999
2011
|
className,
|
|
2000
2012
|
...props
|
|
2001
|
-
}: React.ComponentProps<typeof ResizablePrimitive.
|
|
2013
|
+
}: React.ComponentProps<typeof ResizablePrimitive.Separator> & {
|
|
2002
2014
|
withHandle?: boolean;
|
|
2003
2015
|
}) {
|
|
2004
2016
|
return (
|
|
2005
|
-
<ResizablePrimitive.
|
|
2017
|
+
<ResizablePrimitive.Separator
|
|
2006
2018
|
data-slot="resizable-handle"
|
|
2007
2019
|
className={cn(
|
|
2008
|
-
"
|
|
2020
|
+
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
2009
2021
|
className,
|
|
2010
2022
|
)}
|
|
2011
2023
|
{...props}
|
|
@@ -2015,11 +2027,11 @@ function ResizableHandle({
|
|
|
2015
2027
|
<GripVerticalIcon className="size-2.5" />
|
|
2016
2028
|
</div>
|
|
2017
2029
|
)}
|
|
2018
|
-
</ResizablePrimitive.
|
|
2030
|
+
</ResizablePrimitive.Separator>
|
|
2019
2031
|
);
|
|
2020
2032
|
}
|
|
2021
2033
|
|
|
2022
|
-
export {
|
|
2034
|
+
export { Group, ResizablePanel, Separator };
|
|
2023
2035
|
|
|
2024
2036
|
```
|
|
2025
2037
|
|
|
@@ -2146,13 +2158,13 @@ function TooltipContent({
|
|
|
2146
2158
|
data-slot="tooltip-content"
|
|
2147
2159
|
sideOffset={sideOffset}
|
|
2148
2160
|
className={cn(
|
|
2149
|
-
"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-
|
|
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-foreground px-3 py-1.5 text-background text-xs data-[state=closed]:animate-out",
|
|
2150
2162
|
className,
|
|
2151
2163
|
)}
|
|
2152
2164
|
{...props}
|
|
2153
2165
|
>
|
|
2154
2166
|
{children}
|
|
2155
|
-
<TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-
|
|
2167
|
+
<TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />
|
|
2156
2168
|
</TooltipPrimitive.Content>
|
|
2157
2169
|
</TooltipPrimitive.Portal>
|
|
2158
2170
|
);
|
|
@@ -2210,15 +2222,16 @@ export default nextConfig;
|
|
|
2210
2222
|
```json
|
|
2211
2223
|
{
|
|
2212
2224
|
"name": "with-react-hook-form",
|
|
2213
|
-
"version": "0.
|
|
2225
|
+
"version": "0.0.0",
|
|
2214
2226
|
"private": true,
|
|
2227
|
+
"type": "module",
|
|
2215
2228
|
"scripts": {
|
|
2216
|
-
"dev": "next dev
|
|
2229
|
+
"dev": "next dev",
|
|
2217
2230
|
"build": "next build",
|
|
2218
2231
|
"start": "next start"
|
|
2219
2232
|
},
|
|
2220
2233
|
"dependencies": {
|
|
2221
|
-
"@ai-sdk/openai": "^2.0.
|
|
2234
|
+
"@ai-sdk/openai": "^2.0.88",
|
|
2222
2235
|
"@assistant-ui/react": "workspace:*",
|
|
2223
2236
|
"@assistant-ui/react-ai-sdk": "workspace:*",
|
|
2224
2237
|
"@assistant-ui/react-hook-form": "workspace:*",
|
|
@@ -2226,34 +2239,33 @@ export default nextConfig;
|
|
|
2226
2239
|
"@hookform/resolvers": "^5.2.2",
|
|
2227
2240
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
2228
2241
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
2229
|
-
"@radix-ui/react-icons": "^1.3.2",
|
|
2230
2242
|
"@radix-ui/react-label": "^2.1.8",
|
|
2231
2243
|
"@radix-ui/react-slot": "^1.2.4",
|
|
2232
2244
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
2233
2245
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
2234
|
-
"
|
|
2235
|
-
"ai": "^5.0.112",
|
|
2246
|
+
"ai": "^5.0.116",
|
|
2236
2247
|
"class-variance-authority": "^0.7.1",
|
|
2237
2248
|
"clsx": "^2.1.1",
|
|
2238
|
-
"lucide-react": "^0.
|
|
2239
|
-
"next": "16.0
|
|
2249
|
+
"lucide-react": "^0.562.0",
|
|
2250
|
+
"next": "16.1.0",
|
|
2240
2251
|
"react": "19.2.3",
|
|
2241
2252
|
"react-dom": "19.2.3",
|
|
2242
|
-
"react-hook-form": "^7.
|
|
2243
|
-
"react-resizable-panels": "^
|
|
2253
|
+
"react-hook-form": "^7.69.0",
|
|
2254
|
+
"react-resizable-panels": "^4.0.13",
|
|
2244
2255
|
"remark-gfm": "^4.0.1",
|
|
2245
2256
|
"tailwind-merge": "^3.4.0",
|
|
2246
|
-
"
|
|
2247
|
-
"zod": "^4.1.13",
|
|
2257
|
+
"zod": "^4.2.1",
|
|
2248
2258
|
"zustand": "^5.0.9"
|
|
2249
2259
|
},
|
|
2250
2260
|
"devDependencies": {
|
|
2251
2261
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
2252
|
-
"@
|
|
2253
|
-
"@types/
|
|
2254
|
-
"@types/react
|
|
2255
|
-
"
|
|
2262
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
2263
|
+
"@types/node": "^25.0.3",
|
|
2264
|
+
"@types/react": "^19.2.7",
|
|
2265
|
+
"@types/react-dom": "^19.2.3",
|
|
2266
|
+
"postcss": "^8.5.6",
|
|
2256
2267
|
"tailwindcss": "^4.1.18",
|
|
2268
|
+
"tw-animate-css": "^1.4.0",
|
|
2257
2269
|
"typescript": "^5.9.3"
|
|
2258
2270
|
}
|
|
2259
2271
|
}
|
|
@@ -2264,29 +2276,11 @@ export default nextConfig;
|
|
|
2264
2276
|
|
|
2265
2277
|
```json
|
|
2266
2278
|
{
|
|
2267
|
-
"extends": "@assistant-ui/x-buildutils/ts/
|
|
2279
|
+
"extends": "@assistant-ui/x-buildutils/ts/next",
|
|
2268
2280
|
"compilerOptions": {
|
|
2269
|
-
"
|
|
2270
|
-
"module": "ESNext",
|
|
2271
|
-
"incremental": true,
|
|
2272
|
-
"plugins": [
|
|
2273
|
-
{
|
|
2274
|
-
"name": "next"
|
|
2275
|
-
}
|
|
2276
|
-
],
|
|
2277
|
-
"allowJs": true,
|
|
2278
|
-
"strictNullChecks": true,
|
|
2279
|
-
"jsx": "preserve",
|
|
2280
|
-
"paths": {
|
|
2281
|
-
"@/*": ["./*"],
|
|
2282
|
-
"@assistant-ui/*": ["../../packages/*/src"],
|
|
2283
|
-
"@assistant-ui/react/*": ["../../packages/react/src/*"],
|
|
2284
|
-
"@assistant-ui/tap/*": ["../../packages/tap/src/*"],
|
|
2285
|
-
"assistant-stream": ["../../packages/assistant-stream/src"],
|
|
2286
|
-
"assistant-stream/*": ["../../packages/assistant-stream/src/*"]
|
|
2287
|
-
}
|
|
2281
|
+
"paths": { "@/*": ["./*"] }
|
|
2288
2282
|
},
|
|
2289
|
-
"include": ["
|
|
2283
|
+
"include": ["**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
2290
2284
|
"exclude": ["node_modules"]
|
|
2291
2285
|
}
|
|
2292
2286
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Example: store
|
|
1
|
+
# Example: with-store
|
|
2
2
|
|
|
3
3
|
## app/globals.css
|
|
4
4
|
|
|
@@ -473,9 +473,10 @@ export default nextConfig;
|
|
|
473
473
|
|
|
474
474
|
```json
|
|
475
475
|
{
|
|
476
|
-
"name": "store
|
|
477
|
-
"version": "0.
|
|
476
|
+
"name": "with-store",
|
|
477
|
+
"version": "0.0.0",
|
|
478
478
|
"private": true,
|
|
479
|
+
"type": "module",
|
|
479
480
|
"scripts": {
|
|
480
481
|
"dev": "next dev",
|
|
481
482
|
"build": "next build",
|
|
@@ -484,18 +485,20 @@ export default nextConfig;
|
|
|
484
485
|
"dependencies": {
|
|
485
486
|
"@assistant-ui/store": "workspace:*",
|
|
486
487
|
"@assistant-ui/tap": "workspace:*",
|
|
487
|
-
"next": "16.0
|
|
488
|
+
"next": "16.1.0",
|
|
488
489
|
"react": "19.2.3",
|
|
489
490
|
"react-dom": "19.2.3"
|
|
490
491
|
},
|
|
491
492
|
"devDependencies": {
|
|
492
493
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
493
|
-
"@tailwindcss/postcss": "^4",
|
|
494
|
-
"@types/node": "^25",
|
|
495
|
-
"@types/react": "19.2.7",
|
|
496
|
-
"@types/react-dom": "19.2.3",
|
|
497
|
-
"
|
|
498
|
-
"
|
|
494
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
495
|
+
"@types/node": "^25.0.3",
|
|
496
|
+
"@types/react": "^19.2.7",
|
|
497
|
+
"@types/react-dom": "^19.2.3",
|
|
498
|
+
"postcss": "^8.5.6",
|
|
499
|
+
"tailwindcss": "^4.1.18",
|
|
500
|
+
"tw-animate-css": "^1.4.0",
|
|
501
|
+
"typescript": "^5.9.3"
|
|
499
502
|
}
|
|
500
503
|
}
|
|
501
504
|
|
|
@@ -637,18 +640,11 @@ useAssistantEvent("*", (data) => {
|
|
|
637
640
|
|
|
638
641
|
```json
|
|
639
642
|
{
|
|
640
|
-
"extends": "@assistant-ui/x-buildutils/ts/
|
|
643
|
+
"extends": "@assistant-ui/x-buildutils/ts/next",
|
|
641
644
|
"compilerOptions": {
|
|
642
|
-
"paths": {
|
|
643
|
-
"@/*": ["./*"],
|
|
644
|
-
"@assistant-ui/*": ["../../packages/*/src"],
|
|
645
|
-
"@assistant-ui/react/*": ["../../packages/react/src/*"],
|
|
646
|
-
"@assistant-ui/tap/*": ["../../packages/tap/src/*"],
|
|
647
|
-
"assistant-stream": ["../../packages/assistant-stream/src"],
|
|
648
|
-
"assistant-stream/*": ["../../packages/assistant-stream/src/*"]
|
|
649
|
-
}
|
|
645
|
+
"paths": { "@/*": ["./*"] }
|
|
650
646
|
},
|
|
651
|
-
"include": ["
|
|
647
|
+
"include": ["**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
652
648
|
"exclude": ["node_modules"]
|
|
653
649
|
}
|
|
654
650
|
|