feat: implement chat page with conversation list, message view, and polling

This commit is contained in:
2026-08-12 17:51:00 +02:00
parent 68c5024334
commit 91260c8e30
4 changed files with 154 additions and 1 deletions

View File

@@ -1,3 +1,32 @@
import { useState } from "react";
import { useParams } from "react-router-dom";
import ConversationList from "../components/ConversationList";
import MessageList from "../components/MessageList";
import MessageInput from "../components/MessageInput";
export default function ChatPage() {
return <div>Chat</div>;
const { workspaceId } = useParams<{ workspaceId: string }>();
const [conversationId, setConversationId] = useState<string | null>(null);
return (
<div style={{ display: "flex", height: "100vh" }}>
<ConversationList
workspaceId={workspaceId!}
onSelect={setConversationId}
selectedId={conversationId}
/>
<div style={{ flex: 1, display: "flex", flexDirection: "column" }}>
{conversationId ? (
<>
<MessageList conversationId={conversationId} />
<MessageInput conversationId={conversationId} />
</>
) : (
<div style={{ flex: 1, display: "flex", alignItems: "center", justifyContent: "center", color: "#888" }}>
Select a conversation
</div>
)}
</div>
</div>
);
}