diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatContainer/ChatContainer.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatContainer/ChatContainer.tsx
index 7e88696c4a..c76eb406cb 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatContainer/ChatContainer.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatContainer/ChatContainer.tsx
@@ -35,10 +35,10 @@ export const ChatContainer = ({messages, status, error, input, setInput, handleM
setIsCreating(false);
}
}
-
+
return (
-
+
{sessionId ? (
-
-
-
- {!isCollapsed && (
-
- Acme
-
- )}
-
-
-
+ {isCollapsed &&
+
+
+
}
-
+ }
+
+ {!isCollapsed &&
+
+
+
}
+
+
+
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/page.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/page.tsx
index 66961b541c..7cb8a4c8c3 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/page.tsx
@@ -5,18 +5,22 @@ import { DefaultChatTransport } from "ai";
import { useState, useMemo } from "react";
import { parseAsString, useQueryState } from "nuqs";
import { ChatSidebar } from "./components/ChatSidebar/ChatSidebar";
-import { EmptySession } from "./components/EmptySession/EmptySession";
-import { ChatMessagesContainer } from "./components/ChatMessagesContainer/ChatMessagesContainer";
-import { postV2CreateSession } from "@/app/api/__generated__/endpoints/chat/chat";
-import { ChatInput } from "@/components/contextual/Chat/components/ChatInput/ChatInput";
-import { useSearchParams } from "next/navigation";
import { ChatContainer } from "./components/ChatContainer/ChatContainer";
import { SidebarProvider, SidebarInset } from "@/components/ui/sidebar";
+import { Button } from "@/components/ui/button";
+import { CopyIcon, CheckIcon } from "@phosphor-icons/react";
export default function Page() {
const [input, setInput] = useState("");
- const searchParams = useSearchParams();
- const sessionId = searchParams.get("sessionId") ?? undefined;
+ const [copied, setCopied] = useState(false);
+ const [sessionId] = useQueryState("sessionId", parseAsString);
+
+ function handleCopySessionId() {
+ if (!sessionId) return;
+ navigator.clipboard.writeText(sessionId);
+ setCopied(true);
+ setTimeout(() => setCopied(false), 2000);
+ }
const transport = useMemo(() => {
if (!sessionId) return null;
@@ -56,18 +60,39 @@ export default function Page() {
}
return (
-
+
-
-
+
+ {sessionId && (
+
+
+ {sessionId.slice(0, 8)}...
+
+
+
+ )}
+
+
+
);
diff --git a/autogpt_platform/frontend/src/components/layout/Navbar/Navbar.tsx b/autogpt_platform/frontend/src/components/layout/Navbar/Navbar.tsx
index f4bdecd1df..4e42d48b05 100644
--- a/autogpt_platform/frontend/src/components/layout/Navbar/Navbar.tsx
+++ b/autogpt_platform/frontend/src/components/layout/Navbar/Navbar.tsx
@@ -62,7 +62,7 @@ export function Navbar() {
) : null}