Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
Add resizable chat sidebar (#1347)
shivam2b08d8669646
diff --git a/apps/web/src/routes/_chat.tsx b/apps/web/src/routes/_chat.tsxindex 193cb0e7a..7cb377056 100644--- a/apps/web/src/routes/_chat.tsx+++ b/apps/web/src/routes/_chat.tsx@@ -10,11 +10,14 @@ import { serverConfigQueryOptions } from "../lib/serverReactQuery";import { resolveShortcutCommand } from "../keybindings";import { selectThreadTerminalState, useTerminalStateStore } from "../terminalStateStore";import { useThreadSelectionStore } from "../threadSelectionStore";-import { Sidebar, SidebarProvider } from "~/components/ui/sidebar";import { resolveSidebarNewThreadEnvMode } from "~/components/Sidebar.logic";import { useAppSettings } from "~/appSettings";+import { Sidebar, SidebarProvider, SidebarRail } from "~/components/ui/sidebar";const EMPTY_KEYBINDINGS: ResolvedKeybindingsConfig = [];+const THREAD_SIDEBAR_WIDTH_STORAGE_KEY = "chat_thread_sidebar_width";+const THREAD_SIDEBAR_MIN_WIDTH = 13 * 16;+const THREAD_MAIN_CONTENT_MIN_WIDTH = 40 * 16;function ChatRouteGlobalShortcuts() {const clearSelection = useThreadSelectionStore((state) => state.clearSelection);@@ -116,8 +119,15 @@ function ChatRouteLayout() {side="left"collapsible="offcanvas"className="border-r border-border bg-card text-foreground"+ resizable={{+ minWidth: THREAD_SIDEBAR_MIN_WIDTH,+ shouldAcceptWidth: ({ nextWidth, wrapper }) =>+ wrapper.clientWidth - nextWidth >= THREAD_MAIN_CONTENT_MIN_WIDTH,+ storageKey: THREAD_SIDEBAR_WIDTH_STORAGE_KEY,+ }}><ThreadSidebar />+ <SidebarRail /></Sidebar><Outlet /></SidebarProvider>