AskAi
A placeholder chat panel with open and close controls and keyboard shortcuts.
The AskAi component renders a floating chat button and a placeholder chat panel. It does not answer documentation questions today.
Usage
---import { AskAi } from '@publier/shell/qwik';---
<AskAi client:load />The component is self-contained — it manages its own open/close state and renders both the trigger button and the chat panel.
Features
- Floating trigger button — bottom-right pill button, hides when panel opens
- Chat panel — 460px-wide panel on large screens, inset panel with a backdrop on smaller screens
- Keyboard shortcuts —
Cmd/Ctrl + /to toggle,Escapeto close - Input area — fixed one-row textarea and a placeholder send button; the button has no submit handler
- Cross-container events — toggle from external code via DOM events
External control
Toggle the panel from anywhere on the page via a DOM custom event:
// Toggle the panel from anywheredocument.dispatchEvent(new CustomEvent('publier:ai-toggle'));Backend integration
The component currently shows a placeholder UI. Its send button does not submit a request, and it exposes no submit event or response adapter. The ai.endpoint configuration is not supported. To offer working Q&A today, build your own chat component and connect it to your chosen backend; the built-in adapter and streaming responses remain future work.