feat(chat): remove mobile check and open new session draft when no active session

This commit is contained in:
Bohdan Triapitsyn
2025-12-22 01:29:11 +02:00
parent 5e103394d7
commit d2b3d056cc
2 changed files with 5 additions and 10 deletions
@@ -46,12 +46,12 @@ export const VSCodeLayout: React.FC = () => {
}
}, [currentSessionId]);
// If the active session disappears (e.g., deleted), stay on the sessions list
// If the active session disappears (e.g., deleted), show a new chat view
React.useEffect(() => {
if (!currentSessionId && !newSessionDraftOpen && currentView === 'chat') {
setCurrentView('sessions');
if (!currentSessionId && !newSessionDraftOpen) {
openNewSessionDraft();
}
}, [currentSessionId, currentView, newSessionDraftOpen]);
}, [currentSessionId, newSessionDraftOpen, openNewSessionDraft]);
const handleBackToSessions = React.useCallback(() => {
setCurrentView('sessions');