import { mountAssistantWidget, type AssistantWidgetContext, type AssistantWidgetHandle, } from '../domain/ai-assistant/widget/mountAssistantWidget'; /** * Mount the assistant on the current page. * * Domain classes must not touch DOM globals, so the widget layer resolves the * document itself. Tests and non-browser callers keep using * `mountAssistantWidget(doc, context)` with an explicit document. */ export function mountAssistantWidgetOnPage( context: AssistantWidgetContext, ): AssistantWidgetHandle | null { const doc = globalThis.document; return doc ? mountAssistantWidget(doc, context) : null; }