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. |
chatAppId | String | No | 'openregister' | Backend app id the chat/agent endpoints resolve against (see chatApiBase / DEFAULT_CHAT_APP_ID). Passed through to useAiChatStream so a deployment can point the companion at another backend (e.g. hermiq). |
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