Subscribe to host environment context (theme, locale, display mode, layout).
Re-renders only when host context or bridge connection status changes — not on tool-input / result / cancel snapshot updates.
function Layout() { const { theme, locale, maxHeight } = useHostContext(); return ( <div data-theme={theme} lang={locale} style={{ maxHeight }}> … </div> );} Copy
function Layout() { const { theme, locale, maxHeight } = useHostContext(); return ( <div data-theme={theme} lang={locale} style={{ maxHeight }}> … </div> );}
Subscribe to host environment context (theme, locale, display mode, layout).
Re-renders only when host context or bridge connection status changes — not on tool-input / result / cancel snapshot updates.