| text_to_speech: { | text_to_speech: { | ||||
| enabled: true, | enabled: true, | ||||
| }, | }, | ||||
| questionEditEnable: false, | |||||
| supportAnnotation: true, | supportAnnotation: true, | ||||
| annotation_reply: { | annotation_reply: { | ||||
| enabled: true, | enabled: true, | ||||
| text_to_speech: { | text_to_speech: { | ||||
| enabled: true, | enabled: true, | ||||
| }, | }, | ||||
| questionEditEnable: false, | |||||
| supportAnnotation: true, | supportAnnotation: true, | ||||
| annotation_reply: { | annotation_reply: { | ||||
| enabled: true, | enabled: true, |
| item={item} | item={item} | ||||
| questionIcon={questionIcon} | questionIcon={questionIcon} | ||||
| theme={themeBuilder?.theme} | theme={themeBuilder?.theme} | ||||
| enableEdit={config?.questionEditEnable} | |||||
| switchSibling={switchSibling} | switchSibling={switchSibling} | ||||
| /> | /> | ||||
| ) | ) |
| item: ChatItem | item: ChatItem | ||||
| questionIcon?: ReactNode | questionIcon?: ReactNode | ||||
| theme: Theme | null | undefined | theme: Theme | null | undefined | ||||
| enableEdit?: boolean | |||||
| switchSibling?: (siblingMessageId: string) => void | switchSibling?: (siblingMessageId: string) => void | ||||
| } | } | ||||
| item, | item, | ||||
| questionIcon, | questionIcon, | ||||
| theme, | theme, | ||||
| enableEdit = true, | |||||
| switchSibling, | switchSibling, | ||||
| }) => { | }) => { | ||||
| const { t } = useTranslation() | const { t } = useTranslation() | ||||
| }}> | }}> | ||||
| <RiClipboardLine className='h-4 w-4' /> | <RiClipboardLine className='h-4 w-4' /> | ||||
| </ActionButton> | </ActionButton> | ||||
| <ActionButton onClick={handleEdit}> | |||||
| {enableEdit && <ActionButton onClick={handleEdit}> | |||||
| <RiEditLine className='h-4 w-4' /> | <RiEditLine className='h-4 w-4' /> | ||||
| </ActionButton> | |||||
| </ActionButton>} | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div | <div |
| export type ChatConfig = Omit<ModelConfig, 'model'> & { | export type ChatConfig = Omit<ModelConfig, 'model'> & { | ||||
| supportAnnotation?: boolean | supportAnnotation?: boolean | ||||
| appId?: string | appId?: string | ||||
| questionEditEnable?: boolean | |||||
| supportFeedback?: boolean | supportFeedback?: boolean | ||||
| supportCitationHitInfo?: boolean | supportCitationHitInfo?: boolean | ||||
| } | } |