This commit is contained in:
Timothy Jaeryang Baek committed 2026-06-06 23:42:49 +01:00
1 parent af35848d21
commit 1e066cfecd
1 file changed
+10 -1
+10 -1
View File
@@ -119,8 +119,17 @@ export const workspaceList = writable<{ path: string; name: string }[]>([]);
/** Global user preferences. */
export const sidebarOpen = writable(
typeof window !== 'undefined' ? window.innerWidth >= 768 : false
typeof window !== 'undefined' ? window.innerWidth >= 1024 : false
);
// Auto-close sidebar when window is resized below mobile breakpoint
if (typeof window !== 'undefined') {
window.addEventListener('resize', () => {
if (window.innerWidth < 768) {
sidebarOpen.set(false);
}
});
}
export const sidebarWidth = writable(220);
export const theme = writable<Theme>('dark');
export const toolApprovalMode = writable<ToolApprovalMode>('auto');