diff --git a/surfsense_web/components/chat/ChatInterface.tsx b/surfsense_web/components/chat/ChatInterface.tsx
index f94c2b3ee..72fddfff9 100644
--- a/surfsense_web/components/chat/ChatInterface.tsx
+++ b/surfsense_web/components/chat/ChatInterface.tsx
@@ -2,6 +2,7 @@
import { type ChatHandler, ChatSection as LlamaIndexChatSection } from "@llamaindex/chat-ui";
import { PanelRight } from "lucide-react";
+import { useParams } from "next/navigation";
import { createContext, useState } from "react";
import type { ResearchMode } from "@/components/chat";
import { ChatInputUI } from "@/components/chat/ChatInputGroup";
@@ -42,6 +43,8 @@ export default function ChatInterface({
setIsChatPannelOpen,
};
+ const { chat_id: chatId } = useParams();
+
return (
@@ -60,31 +63,33 @@ export default function ChatInterface({
/>
-
+ {chatId ? (
-
-
-
+ ) : null}
diff --git a/surfsense_web/components/chat/ChatPannel/ChatPanelView.tsx b/surfsense_web/components/chat/ChatPannel/ChatPanelView.tsx
index c03f6fb7d..1835a5677 100644
--- a/surfsense_web/components/chat/ChatPannel/ChatPanelView.tsx
+++ b/surfsense_web/components/chat/ChatPannel/ChatPanelView.tsx
@@ -4,8 +4,13 @@ import { Pencil, Podcast } from "lucide-react";
import { useContext } from "react";
import { cn } from "@/lib/utils";
import { chatInterfaceContext } from "../ChatInterface";
+import { ConfigModal } from "./ConfigModal";
-export default function ChatPanelView() {
+interface ChatPanelViewProps {
+ chatId: string;
+}
+
+export default function ChatPanelView({ chatId }: ChatPanelViewProps) {
const context = useContext(chatInterfaceContext);
if (!context) {
throw new Error("chatInterfaceContext must be used within a ChatProvider");
@@ -22,16 +27,10 @@ export default function ChatPanelView() {
)}
>
{isChatPannelOpen ? (
-
+
diff --git a/surfsense_web/components/chat/ChatPannel/ChatPannelContainer.tsx b/surfsense_web/components/chat/ChatPannel/ChatPannelContainer.tsx
index 7df13a1d2..881000a67 100644
--- a/surfsense_web/components/chat/ChatPannel/ChatPannelContainer.tsx
+++ b/surfsense_web/components/chat/ChatPannel/ChatPannelContainer.tsx
@@ -1,5 +1,9 @@
import ChatPanelView from "./ChatPanelView";
-export function ChatPanelContainer() {
- return
;
+interface ChatPanelContainerProps {
+ chatId: string;
+}
+
+export function ChatPanelContainer({ chatId }: ChatPanelContainerProps) {
+ return
;
}
diff --git a/surfsense_web/components/chat/ChatPannel/ConfigModal.tsx b/surfsense_web/components/chat/ChatPannel/ConfigModal.tsx
new file mode 100644
index 000000000..4c005e52e
--- /dev/null
+++ b/surfsense_web/components/chat/ChatPannel/ConfigModal.tsx
@@ -0,0 +1,40 @@
+"use client";
+
+import { Pencil } from "lucide-react";
+import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
+
+export function ConfigModal() {
+ return (
+
+
+
+
+
+
+
+
+
+
+ );
+}