refactor: move preference props directly to QuickSettingsPanel and MainContent

This commit is contained in:
Haileyesus
2026-02-06 12:08:00 +03:00
parent abcd239f25
commit 98e16714d2
3 changed files with 21 additions and 43 deletions

View File

@@ -61,7 +61,7 @@ function AppContent() {
const [settingsInitialTab, setSettingsInitialTab] = useState('agents');
const { preferences, setPreference } = useUiPreferences();
const { autoExpandTools, showRawParameters, showThinking, autoScrollToBottom, sendByCtrlEnter, sidebarVisible } = preferences;
const { sidebarVisible } = preferences;
// 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
@@ -692,11 +692,7 @@ function AppContent() {
onReplaceTemporarySession={replaceTemporarySession}
onNavigateToSession={(sessionId) => navigate(`/session/${sessionId}`)}
onShowSettings={() => setShowSettings(true)}
autoExpandTools={autoExpandTools}
showRawParameters={showRawParameters}
showThinking={showThinking}
autoScrollToBottom={autoScrollToBottom}
sendByCtrlEnter={sendByCtrlEnter}
externalMessageUpdate={externalMessageUpdate}
/>
</div>
@@ -711,19 +707,7 @@ function AppContent() {
)}
{/* Quick Settings Panel - Only show on chat tab */}
{activeTab === 'chat' && (
<QuickSettingsPanel
autoExpandTools={autoExpandTools}
onAutoExpandChange={(value) => setPreference('autoExpandTools', value)}
showRawParameters={showRawParameters}
onShowRawParametersChange={(value) => setPreference('showRawParameters', value)}
showThinking={showThinking}
onShowThinkingChange={(value) => setPreference('showThinking', value)}
autoScrollToBottom={autoScrollToBottom}
onAutoScrollChange={(value) => setPreference('autoScrollToBottom', value)}
sendByCtrlEnter={sendByCtrlEnter}
onSendByCtrlEnterChange={(value) => setPreference('sendByCtrlEnter', value)}
isMobile={isMobile}
/>
<QuickSettingsPanel isMobile={isMobile} />
)}
{/* Settings Modal */}