);
}
function MobileHitlEditDrawer() {
const panelState = useAtomValue(hitlEditPanelAtom);
const closePanel = useSetAtom(closeHitlEditPanelAtom);
if (!panelState.onSave) return null;
return (
{
if (!open) closePanel();
}}
shouldScaleBackground={false}
>
Edit {panelState.toolName}
);
}
/**
* Entry point mounted by the right-panel layout. Renders the desktop
* panel on lg+ and the mobile drawer below; both share state via the
* ``hitlEditPanelAtom``.
*/
export function HitlEditPanel() {
const panelState = useAtomValue(hitlEditPanelAtom);
const isDesktop = useMediaQuery("(min-width: 1024px)");
if (!panelState.isOpen) return null;
if (isDesktop) {
return ;
}
return ;
}
/**
* Entry point mounted by chat pages so the mobile drawer can render
* outside the desktop right-panel container.
*/
export function MobileHitlEditPanel() {
const panelState = useAtomValue(hitlEditPanelAtom);
const isDesktop = useMediaQuery("(min-width: 1024px)");
if (isDesktop || !panelState.isOpen) return null;
return ;
}