feat(ui): add recent section toggle

This commit is contained in:
Bohdan Triapitsyn
2026-05-03 16:32:14 +03:00
parent 5614012acb
commit 43f98e0344
9 changed files with 55 additions and 16 deletions
@@ -5,14 +5,20 @@ export type SessionDisplayMode = 'default' | 'minimal';
type SessionDisplayStore = {
displayMode: SessionDisplayMode;
showRecentSection: boolean;
setDisplayMode: (mode: SessionDisplayMode) => void;
setShowRecentSection: (show: boolean) => void;
toggleRecentSection: () => void;
};
export const useSessionDisplayStore = create<SessionDisplayStore>()(
persist(
(set) => ({
displayMode: 'default',
showRecentSection: true,
setDisplayMode: (mode) => set({ displayMode: mode }),
setShowRecentSection: (show) => set({ showRecentSection: show }),
toggleRecentSection: () => set((state) => ({ showRecentSection: !state.showRecentSection })),
}),
{
name: 'session-display-mode',