Pārlūkot izejas kodu

feat(logAndAnn): add control option for question editing feature (#19117)

tags/1.4.0
HyaCinth pirms 6 mēnešiem
vecāks
revīzija
5088ab5061
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam

+ 2
- 0
web/app/components/app/log/list.tsx Parādīt failu

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,

+ 1
- 0
web/app/components/base/chat/chat/index.tsx Parādīt failu

item={item} item={item}
questionIcon={questionIcon} questionIcon={questionIcon}
theme={themeBuilder?.theme} theme={themeBuilder?.theme}
enableEdit={config?.questionEditEnable}
switchSibling={switchSibling} switchSibling={switchSibling}
/> />
) )

+ 4
- 2
web/app/components/base/chat/chat/question.tsx Parādīt failu

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

+ 1
- 0
web/app/components/base/chat/types.ts Parādīt failu

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
} }

Notiek ielāde…
Atcelt
Saglabāt