From 198b59aa5520de0ecf254d6610008211df749d8a Mon Sep 17 00:00:00 2001 From: Akhileshrangani4 Date: Sun, 27 Oct 2024 16:58:17 -0400 Subject: [PATCH] feat: add AI chat button to open it --- frontend/components/editor/index.tsx | 2 ++ frontend/components/editor/sidebar/index.tsx | 28 +++++++++++++++----- frontend/package-lock.json | 6 ++++- frontend/package.json | 1 + 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/frontend/components/editor/index.tsx b/frontend/components/editor/index.tsx index 45fb556..59e7a21 100644 --- a/frontend/components/editor/index.tsx +++ b/frontend/components/editor/index.tsx @@ -1028,6 +1028,8 @@ export default function CodeEditor({ setFiles={setFiles} addNew={(name, type) => addNew(name, type, setFiles, sandboxData)} deletingFolderId={deletingFolderId} + toggleAIChat={toggleAIChat} + isAIChatOpen={isAIChatOpen} /> {/* Outer ResizablePanelGroup for main layout */} void addNew: (name: string, type: "file" | "folder") => void deletingFolderId: string + toggleAIChat: () => void + isAIChatOpen: boolean }) { const ref = useRef(null) // drop target @@ -188,7 +192,7 @@ export default function Sidebar({ style={{ opacity: 1 }} > - Copilot + AI Editor
G @@ -197,12 +201,24 @@ export default function Sidebar({