feat(chat): remove mobile check and open new session draft when no active session
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user