mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 14:22:28 +08:00
feat: remove Assistant component and implement drag-and-drop file upload in ChatInput
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { AssistantRuntimeProvider } from "@assistant-ui/react";
|
||||
import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
|
||||
import { Thread } from "@/components/assistant-ui/thread";
|
||||
import { ThreadList } from "@/components/assistant-ui/thread-list";
|
||||
|
||||
export const Assistant = () => {
|
||||
const runtime = useChatRuntime({
|
||||
api: "/api/chat",
|
||||
});
|
||||
|
||||
return (
|
||||
<AssistantRuntimeProvider runtime={runtime}>
|
||||
<div className="grid h-dvh grid-cols-[200px_1fr] gap-x-2 px-4 py-4">
|
||||
<ThreadList />
|
||||
<Thread />
|
||||
</div>
|
||||
</AssistantRuntimeProvider>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user