diff --git a/src/App.jsx b/src/App.jsx index c018dc3..3a84f0f 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -20,6 +20,7 @@ import React, { useState, useEffect, useCallback } from 'react'; import { BrowserRouter as Router, Routes, Route, useNavigate, useParams } from 'react-router-dom'; +import { Settings as SettingsIcon, Sparkles } from 'lucide-react'; import Sidebar from './components/Sidebar'; import MainContent from './components/MainContent'; import MobileNav from './components/MobileNav'; @@ -60,6 +61,7 @@ function AppContent() { const [showThinking, setShowThinking] = useLocalStorage('showThinking', true); const [autoScrollToBottom, setAutoScrollToBottom] = useLocalStorage('autoScrollToBottom', true); const [sendByCtrlEnter, setSendByCtrlEnter] = useLocalStorage('sendByCtrlEnter', false); + const [sidebarVisible, setSidebarVisible] = useLocalStorage('sidebarVisible', true); // Session Protection System: Track sessions with active conversations to prevent // automatic project updates from interrupting ongoing chats. When a user sends // a message, the session is marked as "active" and project updates are paused @@ -734,28 +736,78 @@ function AppContent() {
{/* Fixed Desktop Sidebar */} {!isMobile && ( -
+
- setShowSettings(true)} - updateAvailable={updateAvailable} - latestVersion={latestVersion} - currentVersion={currentVersion} - releaseInfo={releaseInfo} - onShowVersionModal={() => setShowVersionModal(true)} - isPWA={isPWA} - isMobile={isMobile} - /> + {sidebarVisible ? ( + setShowSettings(true)} + updateAvailable={updateAvailable} + latestVersion={latestVersion} + currentVersion={currentVersion} + releaseInfo={releaseInfo} + onShowVersionModal={() => setShowVersionModal(true)} + isPWA={isPWA} + isMobile={isMobile} + onToggleSidebar={() => setSidebarVisible(false)} + /> + ) : ( + /* Collapsed Sidebar */ +
+ {/* Expand Button */} + + + {/* Settings Icon */} + + + {/* Update Indicator */} + {updateAvailable && ( + + )} +
+ )}
)} @@ -805,6 +857,7 @@ function AppContent() { onShowVersionModal={() => setShowVersionModal(true)} isPWA={isPWA} isMobile={isMobile} + onToggleSidebar={() => setSidebarVisible(false)} />
diff --git a/src/components/ChatInterface.jsx b/src/components/ChatInterface.jsx index 981ab7b..f9c5e96 100644 --- a/src/components/ChatInterface.jsx +++ b/src/components/ChatInterface.jsx @@ -514,7 +514,6 @@ const MessageComponent = memo(({ message, index, prevMessage, createDiff, onFile - 📝 View edit diff for - - + )} {/* Mobile Header */} @@ -914,9 +905,9 @@ function Sidebar({ )} - {/* Search Filter */} + {/* Search Filter and Actions */} {projects.length > 0 && !isLoading && ( -
+
)}
+ + {/* Action Buttons - Desktop only */} + {!isMobile && ( +
+ + +
+ )}
)}