diff --git a/src/app/(app)/problems/[id]/@Bot/page.tsx b/src/app/(app)/problems/[id]/@Bot/page.tsx
new file mode 100644
index 0000000..09bc148
--- /dev/null
+++ b/src/app/(app)/problems/[id]/@Bot/page.tsx
@@ -0,0 +1,125 @@
+"use client";
+
+import { toast } from "sonner";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { useCallback } from "react";
+import { useChat } from "@ai-sdk/react";
+import { Button } from "@/components/ui/button";
+import { useProblem } from "@/hooks/use-problem";
+import MdxPreview from "@/components/mdx-preview";
+import { Textarea } from "@/components/ui/textarea";
+import { BotIcon, SendHorizonal } from "lucide-react";
+import { ScrollArea } from "@/components/ui/scroll-area";
+import { ChatMessageList } from "@/components/ui/chat/chat-message-list";
+import { ChatBubble, ChatBubbleMessage } from "@/components/ui/chat/chat-bubble";
+
+export default function Bot() {
+ const { problemId, problem, currentLang, currentValue } = useProblem();
+
+ const { messages, input, handleInputChange, setMessages, handleSubmit } = useChat({
+ initialMessages: [
+ {
+ id: problemId,
+ role: "system",
+ content: `Problem description:\n${problem.description}`,
+ },
+ ],
+ });
+
+ const handleFormSubmit = useCallback(
+ (e: React.FormEvent) => {
+ e.preventDefault();
+
+ if (!input.trim()) {
+ toast.error("Input cannot be empty");
+ return;
+ }
+
+ const currentCodeMessage = {
+ id: problemId,
+ role: "system" as const,
+ content: `Current code:\n\`\`\`${currentLang}\n${currentValue}\n\`\`\``,
+ };
+
+ setMessages((prev) => [...prev, currentCodeMessage]);
+ handleSubmit();
+ },
+ [currentLang, currentValue, handleSubmit, input, problemId, setMessages]
+ );
+
+ return (
+
+
+ {!messages.some(
+ (message) => message.role === "user" || message.role === "assistant"
+ ) && (
+
+
+ Ask Bot
+ Powered by Vercel Ai SDK
+
+ )}
+
+
+
+
+ {messages
+ .filter(
+ (message) => message.role === "user" || message.role === "assistant"
+ )
+ .map((message) => (
+
+
+
+
+
+ ))}
+
+
+
+
+
+
+
+ );
+}
diff --git a/src/app/(app)/problems/[id]/@Code/page.tsx b/src/app/(app)/problems/[id]/@Code/page.tsx
new file mode 100644
index 0000000..bb7becf
--- /dev/null
+++ b/src/app/(app)/problems/[id]/@Code/page.tsx
@@ -0,0 +1,17 @@
+import { ProblemEditor } from "@/components/problem-editor";
+import { WorkspaceEditorHeader } from "@/components/features/playground/workspace/editor/components/header";
+import { WorkspaceEditorFooter } from "@/components/features/playground/workspace/editor/components/footer";
+
+export default function CodePage() {
+ return (
+
+ );
+}
diff --git a/src/app/(app)/problems/[id]/@Description/page.tsx b/src/app/(app)/problems/[id]/@Description/page.tsx
new file mode 100644
index 0000000..297525e
--- /dev/null
+++ b/src/app/(app)/problems/[id]/@Description/page.tsx
@@ -0,0 +1,42 @@
+import prisma from "@/lib/prisma";
+import { notFound } from "next/navigation";
+import MdxPreview from "@/components/mdx-preview";
+import { ScrollArea } from "@/components/ui/scroll-area";
+import ProblemDescriptionFooter from "@/components/features/playground/problem/description/footer";
+
+interface DescriptionPageProps {
+ params: Promise<{ id: string }>;
+}
+
+export default async function DescriptionPage({ params }: DescriptionPageProps) {
+ const { id } = await params;
+
+ if (!id) {
+ return notFound();
+ }
+
+ const problem = await prisma.problem.findUnique({
+ where: { id },
+ select: {
+ title: true,
+ description: true,
+ },
+ });
+
+ if (!problem) {
+ return notFound();
+ }
+
+ return (
+
+ );
+}
diff --git a/src/app/(app)/problems/[id]/@Solutions/page.tsx b/src/app/(app)/problems/[id]/@Solutions/page.tsx
new file mode 100644
index 0000000..bd697d9
--- /dev/null
+++ b/src/app/(app)/problems/[id]/@Solutions/page.tsx
@@ -0,0 +1,43 @@
+import prisma from "@/lib/prisma";
+import { notFound } from "next/navigation";
+import MdxPreview from "@/components/mdx-preview";
+import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
+import ProblemSolutionFooter from "@/components/features/playground/problem/solution/footer";
+
+interface SolutionsPageProps {
+ params: Promise<{ id: string }>;
+}
+
+export default async function SolutionsPage({ params }: SolutionsPageProps) {
+ const { id } = await params;
+
+ if (!id) {
+ return notFound();
+ }
+
+ const problem = await prisma.problem.findUnique({
+ where: { id },
+ select: {
+ title: true,
+ solution: true,
+ },
+ });
+
+ if (!problem) {
+ return notFound();
+ }
+
+ return (
+
+ );
+}
diff --git a/src/app/(app)/problems/[id]/@Submissions/page.tsx b/src/app/(app)/problems/[id]/@Submissions/page.tsx
new file mode 100644
index 0000000..d5e165d
--- /dev/null
+++ b/src/app/(app)/problems/[id]/@Submissions/page.tsx
@@ -0,0 +1,36 @@
+import prisma from "@/lib/prisma";
+import { notFound } from "next/navigation";
+import SubmissionsTable from "@/components/submissions-table";
+import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
+
+interface SubmissionsPageProps {
+ params: Promise<{ id: string }>;
+}
+
+export default async function SubmissionsPage({ params }: SubmissionsPageProps) {
+ const { id } = await params;
+
+ if (!id) {
+ return notFound();
+ }
+
+ const problem = await prisma.problem.findUnique({
+ where: { id },
+ select: {
+ submissions: true,
+ },
+ });
+
+ if (!problem) {
+ return notFound();
+ }
+
+ return (
+
+
+
+
+
+
+ );
+}
diff --git a/src/app/(app)/problems/[id]/@TestResult/page.tsx b/src/app/(app)/problems/[id]/@TestResult/page.tsx
new file mode 100644
index 0000000..c954c5a
--- /dev/null
+++ b/src/app/(app)/problems/[id]/@TestResult/page.tsx
@@ -0,0 +1,3 @@
+export default function TestResult() {
+ return Test Result
;
+}
diff --git a/src/app/(app)/problems/[id]/@Testcase/page.tsx b/src/app/(app)/problems/[id]/@Testcase/page.tsx
new file mode 100644
index 0000000..4be2bf0
--- /dev/null
+++ b/src/app/(app)/problems/[id]/@Testcase/page.tsx
@@ -0,0 +1,41 @@
+import prisma from "@/lib/prisma";
+import { notFound } from "next/navigation";
+import TestcaseCard from "@/components/testcase-card";
+import { ScrollArea } from "@/components/ui/scroll-area";
+
+interface TestcasePageProps {
+ params: Promise<{ id: string }>;
+}
+
+export default async function TestcasePage({ params }: TestcasePageProps) {
+ const { id } = await params;
+
+ if (!id) {
+ return notFound();
+ }
+
+ const problem = await prisma.problem.findUnique({
+ where: { id },
+ select: {
+ testcases: {
+ include: {
+ data: true,
+ },
+ },
+ },
+ });
+
+ if (!problem) {
+ return notFound();
+ }
+
+ return (
+
+ );
+}