Skip to content

AiConversations

AiConversations is a sidebar component tailored for AI chat sessions, offering full interactive capabilities for creating, switching, renaming, and deleting conversations.

Basic Usage

Demonstrates basic list rendering and interactions.

Today
Vue 3 Component Guide01:28
Last 7 Days
Performance Optimization3/2Crucial for modern web development...
Basic Usage

Custom Theme

Use theme-overrides to customize component styles.

Today
Dark Theme Chat02:28
Custom Theme

API

Props

NameDescriptionTypeDefault
dataList dataAiConversation[][]
activeIdCurrently active IDstring''
loadingShows loading statebooleanfalse
theme-overridesTheme variables overrideAiConversationsThemeVars

Events

NameDescriptionCallback Parameters
update:activeIdEmitted when selection changes(id: string) => void
createEmitted when clicking Add button() => void
deleteEmitted when clicking Delete button(item: AiConversation) => void
editEmitted when finishing title edit(item: AiConversation, newTitle: string) => void
clickEmitted when clicking list item(item: AiConversation) => void

Slots

NameDescriptionSlot Scope
add-iconCustom icon for Add button
add-textCustom text for Add button
edit-iconCustom icon for Edit button
delete-iconCustom icon for Delete button
emptyLayout when list is empty

Use in Nuxt

This component fully supports Nuxt 3/4. In Nuxt projects, the component will be automatically imported.

For detailed configuration, please see Nuxt Integration.

Theme Variables

Variable NameDescriptionDefault Value
--yh-ai-conversations-bg-colorContainer background colorvar(--yh-bg-color)
--yh-ai-conversations-border-colorBorder colorvar(--yh-border-color)
--yh-ai-conversations-header-paddingHeader padding16px
--yh-ai-conversations-item-paddingItem padding12px 16px
--yh-ai-conversations-hover-bg-colorItem hover background colorvar(--yh-bg-color-page)
--yh-ai-conversations-active-bg-colorActive item background colorvar(--yh-color-primary-light-9)
--yh-ai-conversations-active-text-colorActive item text colorvar(--yh-color-primary)
--yh-ai-conversations-title-font-sizeTitle font size14px
--yh-ai-conversations-time-font-sizeTime font size12px

Released under the MIT License.