AP Synapse

AP Synapse is a next-generation artificial intelligence platform created by Anuprit Patil. It is designed to help users with intelligent conversations, research, creativity, coding, documents, and productivity.

Your Intelligent Workspace

Thinking...
AP SYNAPSE

The Intelligence Operating System.

One intelligent workspace for everything you build.

RECENT INTELLIGENCE

Continue where you left off

Create New Project

➕ New Conversation
📁 Create Project
🌐 Web Search
🎤 Voice Assistant
🌙 Toggle Theme
ℹ About AP Synapse
/* ========================================================= AP SYNAPSE — SIDEBAR CONTROL ENGINE ========================================================= */ (() => { const sidebar = document.getElementById("apSidebarCollapse"); const rail = document.getElementById("apCollapsedRail"); const railOpen = document.getElementById("apRailOpen"); const railNewChat = document.getElementById("apRailNewChat"); const railRecent = document.getElementById("apRailRecent"); const railSettings = document.getElementById("apRailSettings"); const railProfile = document.getElementById("apRailProfile"); const mobileMenu = document.getElementById("apMobileMenu"); const overlay = document.getElementById("apSidebarOverlay"); /* ------------------------------------------------------- DESKTOP — COLLAPSE ------------------------------------------------------- */ if (sidebar) { sidebar.addEventListener("click", (event) => { if ( event.target.closest("#apSidebarCollapse") ) { event.preventDefault(); event.stopPropagation(); document.body.classList.add( "ap-sidebar-collapsed" ); } }); } /* ------------------------------------------------------- DESKTOP — RESTORE ------------------------------------------------------- */ if (railOpen) { railOpen.addEventListener("click", (event) => { event.preventDefault(); event.stopPropagation(); document.body.classList.remove( "ap-sidebar-collapsed" ); }); } /* ------------------------------------------------------- RAIL — NEW CONVERSATION ------------------------------------------------------- */ if (railNewChat) { railNewChat.addEventListener("click", () => { const newChat = document.querySelector(".new-chat-btn"); if (newChat) { newChat.click(); return; } const assistant = document.getElementById("assistantBtn"); if (assistant) { assistant.click(); } }); } /* ------------------------------------------------------- RAIL — RECENT ------------------------------------------------------- */ if (railRecent) { railRecent.addEventListener("click", () => { const recent = document.querySelector(".recent-group"); if (recent) { recent.scrollIntoView({ behavior: "smooth", block: "nearest" }); } }); } /* ------------------------------------------------------- RAIL — SETTINGS ------------------------------------------------------- */ if (railSettings) { railSettings.addEventListener("click", () => { const settings = document.getElementById( "sidebarSettingsBtn" ); if (settings) { settings.click(); } }); } /* ------------------------------------------------------- RAIL — PROFILE ------------------------------------------------------- */ if (railProfile) { railProfile.addEventListener("click", () => { const profile = document.getElementById( "profileSidebarBtn" ); if (profile) { profile.click(); } }); } /* ------------------------------------------------------- MOBILE — OPEN ------------------------------------------------------- */ if (mobileMenu) { mobileMenu.addEventListener("click", (event) => { event.preventDefault(); event.stopPropagation(); document.body.classList.add( "ap-mobile-sidebar-open" ); }); } /* ------------------------------------------------------- MOBILE — CLOSE ------------------------------------------------------- */ if (overlay) { overlay.addEventListener("click", () => { document.body.classList.remove( "ap-mobile-sidebar-open" ); }); } /* ------------------------------------------------------- MOBILE — ESC ------------------------------------------------------- */ document.addEventListener("keydown", (event) => { if (event.key === "Escape") { document.body.classList.remove( "ap-mobile-sidebar-open" ); document.body.classList.remove( "ap-sidebar-collapsed" ); } }); /* ------------------------------------------------------- INITIAL STATE ALWAYS RESTORE DESKTOP SIDEBAR ------------------------------------------------------- */ if (window.innerWidth >= 769) { document.body.classList.remove( "ap-sidebar-collapsed" ); } console.log( "AP Synapse Sidebar Stabilization: ACTIVE" ); })();