mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-05 22:02:39 +02:00
add new chat page
This commit is contained in:
parent
3bfe860d6f
commit
3208f9bd7b
10 changed files with 22787 additions and 25933 deletions
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue