From ef5decc98aaf4ea4c1ebb5d027fc1d2435699347 Mon Sep 17 00:00:00 2001 From: Yongtao Huang Date: Mon, 18 Aug 2025 16:51:43 +0800 Subject: [PATCH] Chore: remove some dead code in experience-enhance-group (#24110) Co-authored-by: Yongtao Huang <99629139+hyongtao-db@users.noreply.github.com> --- .../experience-enhance-group/index.tsx | 43 ---------------- .../more-like-this/index.tsx | 51 ------------------- web/types/app.ts | 8 --- 3 files changed, 102 deletions(-) delete mode 100644 web/app/components/app/configuration/features/experience-enhance-group/index.tsx delete mode 100644 web/app/components/app/configuration/features/experience-enhance-group/more-like-this/index.tsx diff --git a/web/app/components/app/configuration/features/experience-enhance-group/index.tsx b/web/app/components/app/configuration/features/experience-enhance-group/index.tsx deleted file mode 100644 index 4a629a6b0e..0000000000 --- a/web/app/components/app/configuration/features/experience-enhance-group/index.tsx +++ /dev/null @@ -1,43 +0,0 @@ -'use client' -import type { FC } from 'react' -import React from 'react' -import { useTranslation } from 'react-i18next' -import GroupName from '../../base/group-name' -import TextToSpeech from '../chat-group/text-to-speech' -import MoreLikeThis from './more-like-this' - -/* -* Include -* 1. More like this -*/ - -type ExperienceGroupProps = { - isShowTextToSpeech: boolean - isShowMoreLike: boolean -} - -const ExperienceEnhanceGroup: FC = ({ - isShowTextToSpeech, - isShowMoreLike, -}) => { - const { t } = useTranslation() - - return ( -
- -
- { - isShowMoreLike && ( - - ) - } - { - isShowTextToSpeech && ( - - ) - } -
-
- ) -} -export default React.memo(ExperienceEnhanceGroup) diff --git a/web/app/components/app/configuration/features/experience-enhance-group/more-like-this/index.tsx b/web/app/components/app/configuration/features/experience-enhance-group/more-like-this/index.tsx deleted file mode 100644 index e110d0c9cc..0000000000 --- a/web/app/components/app/configuration/features/experience-enhance-group/more-like-this/index.tsx +++ /dev/null @@ -1,51 +0,0 @@ -'use client' -import type { FC } from 'react' -import React from 'react' -import { useTranslation } from 'react-i18next' -import { XMarkIcon } from '@heroicons/react/24/outline' -import { useLocalStorageState } from 'ahooks' -import MoreLikeThisIcon from '../../../base/icons/more-like-this-icon' -import Panel from '@/app/components/app/configuration/base/feature-panel' - -const GENERATE_NUM = 1 - -const warningIcon = ( - - - - -) -const MoreLikeThis: FC = () => { - const { t } = useTranslation() - - const [isHideTip, setIsHideTip] = useLocalStorageState('isHideMoreLikeThisTip', { - defaultValue: false, - }) - - const headerRight = ( -
{t('appDebug.feature.moreLikeThis.generateNumTip')} {GENERATE_NUM}
- ) - return ( - } - headerRight={headerRight} - noBodySpacing - > - {!isHideTip && ( -
-
-
{warningIcon}
-
{t('appDebug.feature.moreLikeThis.tip')}
-
-
setIsHideTip(true)}> - -
-
- )} - -
- ) -} -export default React.memo(MoreLikeThis) diff --git a/web/types/app.ts b/web/types/app.ts index 64c806e1d8..abc5b34ca5 100644 --- a/web/types/app.ts +++ b/web/types/app.ts @@ -101,14 +101,6 @@ export type SelectTypeFormItem = { options: string[] hide: boolean } - -export type ParagraphTypeFormItem = { - default: string - label: string - variable: string - required: boolean - hide: boolean -} /** * User Input Form Item */