Open History to see the last commit
1export const RIGHT_PANEL_INLINE_LAYOUT_MEDIA_QUERY = "(max-width: 980px)";
2export const THREAD_PANEL_INLINE_MIN_WIDTH = 1_104;
3export const RIGHT_PANEL_SHEET_CLASS_NAME =
4 "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))]";
5
6export type ThreadPanelPresentation = "inline" | "popover";
7
8export function resolveThreadPanelPresentation(
9 workspaceWidth: number | null,
10 occupiedRightPanelWidth: number,
11 rightPanelMaximized: boolean,
12): ThreadPanelPresentation {
13 if (workspaceWidth === null) return "inline";
14
15 const chatPaneWidth = rightPanelMaximized ? 0 : workspaceWidth - occupiedRightPanelWidth;
16 return chatPaneWidth < THREAD_PANEL_INLINE_MIN_WIDTH ? "popover" : "inline";
17}