add new chat page

This commit is contained in:
CREDO23 2025-12-19 16:42:58 +02:00
parent 3bfe860d6f
commit 3208f9bd7b
10 changed files with 22787 additions and 25933 deletions

View file

@ -0,0 +1,19 @@
"use client";
import { AssistantRuntimeProvider } from "@assistant-ui/react";
import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
import { Thread } from "@/components/assistant-ui/thread";
export default function NewChatPage() {
// Using the official assistant-ui pattern - useChatRuntime with NO parameters
// It defaults to /api/chat endpoint
const runtime = useChatRuntime();
return (
<AssistantRuntimeProvider runtime={runtime}>
<div className="h-full">
<Thread />
</div>
</AssistantRuntimeProvider>
);
}