diff --git a/web/app/components/app/log/list.tsx b/web/app/components/app/log/list.tsx index 056ce84f1e..7ce164c01b 100644 --- a/web/app/components/app/log/list.tsx +++ b/web/app/components/app/log/list.tsx @@ -429,6 +429,7 @@ function DetailPanel({ detail, onFeedback }: IDetailPanel) { text_to_speech: { enabled: true, }, + questionEditEnable: false, supportAnnotation: true, annotation_reply: { enabled: true, @@ -484,6 +485,7 @@ function DetailPanel({ detail, onFeedback }: IDetailPanel) { text_to_speech: { enabled: true, }, + questionEditEnable: false, supportAnnotation: true, annotation_reply: { enabled: true, diff --git a/web/app/components/base/chat/chat/index.tsx b/web/app/components/base/chat/chat/index.tsx index 27952fe468..7c8eb23b1b 100644 --- a/web/app/components/base/chat/chat/index.tsx +++ b/web/app/components/base/chat/chat/index.tsx @@ -265,6 +265,7 @@ const Chat: FC = ({ item={item} questionIcon={questionIcon} theme={themeBuilder?.theme} + enableEdit={config?.questionEditEnable} switchSibling={switchSibling} /> ) diff --git a/web/app/components/base/chat/chat/question.tsx b/web/app/components/base/chat/chat/question.tsx index af4d64964c..3f7f2e837f 100644 --- a/web/app/components/base/chat/chat/question.tsx +++ b/web/app/components/base/chat/chat/question.tsx @@ -28,6 +28,7 @@ type QuestionProps = { item: ChatItem questionIcon?: ReactNode theme: Theme | null | undefined + enableEdit?: boolean switchSibling?: (siblingMessageId: string) => void } @@ -35,6 +36,7 @@ const Question: FC = ({ item, questionIcon, theme, + enableEdit = true, switchSibling, }) => { const { t } = useTranslation() @@ -87,9 +89,9 @@ const Question: FC = ({ }}> - + {enableEdit && - + }
& { supportAnnotation?: boolean appId?: string + questionEditEnable?: boolean supportFeedback?: boolean supportCitationHitInfo?: boolean }