Skip to main content

CnAiAgentPicker

Agent dropdown shown on the AI Chat Companion's "start a new conversation" screen (the empty-state of CnAiChatPanel). Purely presentational — the parent owns the agents list, loading, and fetchError (the same fetch feeds the panel's default-agent selection); this component only renders the picker and emits the chosen agent uuid.

Props

PropTypeRequiredDefaultNotes
agentsArrayNo[]Raw agent objects from GET {chatApiBase}/agents ({ uuid|id, name|title }).
valueStringNonullSelected agent uuid (v-model style — parent owns the value).
loadingBooleanNofalseWhether the agent list is still loading.
fetchErrorBooleanNofalseWhether the agent-list fetch failed.

Events

EventPayloadNotes
inputString | nullChosen agent uuid (or null when cleared) — pairs with value for v-model.

Behaviour

  • Degrades gracefully: zero agents disables the select with an explanatory placeholder; a fetch error renders a short inline notice instead of the select, so the surrounding message input and recent sessions stay usable.

Reference