CnAiCompanion
The AI Chat Companion shell. Auto-mounts at the end of NcContent's children
(via CnAppRoot) and renders a floating action button (CnAiFloatingButton)
plus a slide-out chat panel (CnAiChatPanel) — gated by an OpenRegister health
probe and the active cnAiContext. No per-app wiring is required; it surfaces
whenever the OpenRegister chat backend is reachable.
Props
| Prop | Type | Required | Default | Notes |
|---|---|---|---|---|
position | String | No | 'bottom-right' | Viewport corner at which the FAB and panel anchor. Forwarded to CnAiFloatingButton. |
Architecture
- Owns the SSE transport via
useAiChatStream. - Reads per-page context via
useAiContext(the reactivecnAiContextprovided byCnAppRoot). - Conversation history is browsed via
CnAiHistoryDialog.
Reference
- Implementation: src/components/CnAiCompanion/CnAiCompanion.vue
- Related: CnAiFloatingButton, CnAiChatPanel, CnAiMessageList, CnAiInput, CnAiHistoryDialog