Narrow the right sidebar and update task panel and diff panel (#2409)
This commit is contained in:
1 parent
e25ce07cc2
commit
f54f4385e5
3 files changed
+11
-9
No files matched your search
@@ -434,7 +434,7 @@ export function useSettingsRestore(onRestored?: () => void) {
|
||||
? ["Diff line wrapping"]
|
||||
: []),
|
||||
...(settings.autoOpenPlanSidebar !== DEFAULT_UNIFIED_SETTINGS.autoOpenPlanSidebar
|
||||
? ["Task sidebar"]
|
||||
? ["Auto-open task panel"]
|
||||
: []),
|
||||
...(settings.enableAssistantStreaming !== DEFAULT_UNIFIED_SETTINGS.enableAssistantStreaming
|
||||
? ["Assistant output"]
|
||||
@@ -964,12 +964,12 @@ export function GeneralSettingsPanel() {
|
||||
/>
|
||||
|
||||
<SettingsRow
|
||||
title="Task sidebar"
|
||||
description="Open the plan and task sidebar automatically when steps appear."
|
||||
title="Auto-open task panel"
|
||||
description="Open the right-side plan and task panel automatically when steps appear."
|
||||
resetAction={
|
||||
settings.autoOpenPlanSidebar !== DEFAULT_UNIFIED_SETTINGS.autoOpenPlanSidebar ? (
|
||||
<SettingResetButton
|
||||
label="task sidebar"
|
||||
label="auto-open task panel"
|
||||
onClick={() =>
|
||||
updateSettings({
|
||||
autoOpenPlanSidebar: DEFAULT_UNIFIED_SETTINGS.autoOpenPlanSidebar,
|
||||
@@ -984,7 +984,7 @@ export function GeneralSettingsPanel() {
|
||||
onCheckedChange={(checked) =>
|
||||
updateSettings({ autoOpenPlanSidebar: Boolean(checked) })
|
||||
}
|
||||
aria-label="Open the task sidebar automatically"
|
||||
aria-label="Open the task panel automatically"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export const RIGHT_PANEL_INLINE_LAYOUT_MEDIA_QUERY = "(max-width: 1180px)";
|
||||
export const RIGHT_PANEL_INLINE_LAYOUT_MEDIA_QUERY = "(max-width: 980px)";
|
||||
export const RIGHT_PANEL_SHEET_CLASS_NAME =
|
||||
"w-[min(88vw,820px)] max-w-[820px] p-0 wco:mt-[env(titlebar-area-height)] wco:h-[calc(100%-env(titlebar-area-height))] wco:max-h-[calc(100%-env(titlebar-area-height))]";
|
||||
"w-[min(42vw,28rem)] min-w-80 max-w-[28rem] p-0 max-[760px]:w-[min(88vw,24rem)] max-[760px]:min-w-0 wco:mt-[env(titlebar-area-height)] wco:h-[calc(100%-env(titlebar-area-height))] wco:max-h-[calc(100%-env(titlebar-area-height))]";
|
||||
@@ -26,8 +26,9 @@ import { Sidebar, SidebarInset, SidebarProvider, SidebarRail } from "~/component
|
||||
|
||||
const DiffPanel = lazy(() => import("../components/DiffPanel"));
|
||||
const DIFF_INLINE_SIDEBAR_WIDTH_STORAGE_KEY = "chat_diff_sidebar_width";
|
||||
const DIFF_INLINE_DEFAULT_WIDTH = "clamp(28rem,48vw,44rem)";
|
||||
const DIFF_INLINE_SIDEBAR_MIN_WIDTH = 26 * 16;
|
||||
const DIFF_INLINE_DEFAULT_WIDTH = "clamp(24rem,34vw,36rem)";
|
||||
const DIFF_INLINE_SIDEBAR_MIN_WIDTH = 22 * 16;
|
||||
const DIFF_INLINE_SIDEBAR_MAX_WIDTH = 36 * 16;
|
||||
const COMPOSER_COMPACT_MIN_LEFT_CONTROLS_WIDTH_PX = 208;
|
||||
|
||||
const DiffLoadingFallback = (props: { mode: DiffPanelMode }) => {
|
||||
@@ -124,6 +125,7 @@ const DiffPanelInlineSidebar = (props: {
|
||||
collapsible="offcanvas"
|
||||
className="border-l border-border bg-card text-foreground"
|
||||
resizable={{
|
||||
maxWidth: DIFF_INLINE_SIDEBAR_MAX_WIDTH,
|
||||
minWidth: DIFF_INLINE_SIDEBAR_MIN_WIDTH,
|
||||
shouldAcceptWidth: shouldAcceptInlineSidebarWidth,
|
||||
storageKey: DIFF_INLINE_SIDEBAR_WIDTH_STORAGE_KEY,
|
||||
|
||||
Reference in new issue
Block a user