Skip to content

Components: Assistant

Generated from apps/theme/src/components/assistant/: 4 files, 4 components. Import a component through the @/components/… path shown, so a fork can override it in src/custom/.

@/components/assistant/ask-ai-button

apps/theme/src/components/assistant/ask-ai-button.tsx client component

<AskAiButton>

"Ask AI" icon button for the search field: hands what the shopper typed to the assistant and sends it. onOpen runs first so the search (popover or mobile dialog) can close itself. Renders nothing when the shop has the assistant switched off.

PropTypeDescription
termstring
onOpen?() => void
className?string

@/components/assistant/assistant-debug

apps/theme/src/components/assistant/assistant-debug.tsx client component

<AssistantDebug>

Development-only drawer under the chat: every model step (stop reason, tokens, cache reads, dropped thinking blocks), tool call (redacted input, result size, error code), compaction and confirmed action of this conversation, plus the full conversation id to search traces with.

The server sends these entries only when it runs with NODE_ENV=development, and the panel renders this component only in development builds, so a production bundle carries neither.

PropTypeDescription
entriesAssistantDebugEntry[]
conversationIdstring | null

@/components/assistant/assistant-launcher

apps/theme/src/components/assistant/assistant-launcher.tsx client component

<AssistantLauncher>

PropTypeDescription
namestring

@/components/assistant/assistant-panel

apps/theme/src/components/assistant/assistant-panel.tsx client component

<AssistantPanel>

PropTypeDescription
namestring
onClose() => void
request?AssistantRequest | null