diff --git a/frontend/components/editor/index.tsx b/frontend/components/editor/index.tsx index 8abb9b0..f5750ee 100644 --- a/frontend/components/editor/index.tsx +++ b/frontend/components/editor/index.tsx @@ -78,7 +78,6 @@ export default function CodeEditor({ useState() // AI Copilot state - const [ai, setAi] = useState(false) const [generate, setGenerate] = useState<{ show: boolean id: string @@ -260,15 +259,6 @@ export default function CodeEditor({ }, [editorRef]) // Generate widget effect useEffect(() => { - if (!ai) { - setGenerate((prev) => { - return { - ...prev, - show: false, - } - }) - return - } if (generate.show) { setShowSuggestion(false) editorRef?.changeViewZones(function (changeAccessor) { @@ -387,8 +377,6 @@ export default function CodeEditor({ decorations.instance?.clear() } - if (!ai) return - const model = editorRef?.getModel() const line = model?.getLineContent(cursorLine) @@ -745,7 +733,7 @@ export default function CodeEditor({
- {isSelected && ai && showSuggestion && ( + {isSelected && showSuggestion && (
- {generate.show && ai ? ( + {generate.show ? ( addNew(name, type, setFiles, sandboxData)} deletingFolderId={deletingFolderId} - // AI Copilot Toggle - ai={ai} - setAi={setAi} /> {/* Shadcn resizeable panels: https://ui.shadcn.com/docs/components/resizable */} diff --git a/frontend/components/editor/sidebar/index.tsx b/frontend/components/editor/sidebar/index.tsx index a3a1065..45fa643 100644 --- a/frontend/components/editor/sidebar/index.tsx +++ b/frontend/components/editor/sidebar/index.tsx @@ -32,8 +32,6 @@ export default function Sidebar({ socket, setFiles, addNew, - ai, - setAi, deletingFolderId, }: { sandboxData: Sandbox; @@ -50,8 +48,6 @@ export default function Sidebar({ socket: Socket; setFiles: (files: (TFile | TFolder)[]) => void; addNew: (name: string, type: "file" | "folder") => void; - ai: boolean; - setAi: React.Dispatch>; deletingFolderId: string; }) { const ref = useRef(null); // drop target @@ -186,20 +182,6 @@ export default function Sidebar({
-
-
- - Copilot{" "} - - ⌘G - -
- -
{/* */}