diff --git a/web/src/components/message-item/group-button.tsx b/web/src/components/message-item/group-button.tsx
index 3c15ecf..31c642b 100644
--- a/web/src/components/message-item/group-button.tsx
+++ b/web/src/components/message-item/group-button.tsx
@@ -2,16 +2,8 @@ import { PromptIcon } from '@/assets/icon/Icon';
import CopyToClipboard from '@/components/copy-to-clipboard';
import { useSetModalState } from '@/hooks/common-hooks';
import { IRemoveMessageById } from '@/hooks/logic-hooks';
-import {
- DeleteOutlined,
- DislikeOutlined,
- LikeOutlined,
- PauseCircleOutlined,
- SoundOutlined,
- SyncOutlined,
-} from '@ant-design/icons';
+import { DeleteOutlined, SyncOutlined } from '@ant-design/icons';
import { Radio, Tooltip } from 'antd';
-import { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import FeedbackModal from './feedback-modal';
import { useRemoveMessage, useSendFeedback, useSpeech } from './hooks';
@@ -31,22 +23,16 @@ export const AssistantGroupButton = ({
content,
prompt,
audioBinary,
- showLikeButton,
- showLoudspeaker = true,
}: IProps) => {
- const { visible, hideModal, showModal, onFeedbackOk, loading } =
+ const { visible, hideModal, onFeedbackOk, loading } =
useSendFeedback(messageId);
const {
visible: promptVisible,
hideModal: hidePromptModal,
showModal: showPromptModal,
} = useSetModalState();
- const { t } = useTranslation();
- const { handleRead, ref, isPlaying } = useSpeech(content, audioBinary);
-
- const handleLike = useCallback(() => {
- onFeedbackOk({ thumbup: true });
- }, [onFeedbackOk]);
+ useTranslation();
+ useSpeech(content, audioBinary);
return (
<>
@@ -54,24 +40,6 @@ export const AssistantGroupButton = ({
- {showLoudspeaker && (
-
-
- {isPlaying ? : }
-
-
-
- )}
- {showLikeButton && (
- <>
-
-
-
-
-
-
- >
- )}
{prompt && (
diff --git a/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx b/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx
index bccedec..f0c74f3 100644
--- a/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx
+++ b/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx
@@ -2,7 +2,7 @@ import KnowledgeBaseItem from '@/components/knowledge-base-item';
import { useTranslate } from '@/hooks/common-hooks';
import { useFetchTenantInfo } from '@/hooks/user-setting-hooks';
import { PlusOutlined } from '@ant-design/icons';
-import { Form, Input, message, Select, Switch, Upload } from 'antd';
+import { Form, Input, Select, Switch, Upload } from 'antd';
import classNames from 'classnames';
import { useCallback } from 'react';
import { ISegmentedContentProps } from '../interface';
@@ -17,7 +17,7 @@ const AssistantSetting = ({
setHasError,
}: ISegmentedContentProps) => {
const { t } = useTranslate('chat');
- const { data } = useFetchTenantInfo(true);
+ useFetchTenantInfo(true);
const handleChange = useCallback(() => {
const kbIds = form.getFieldValue('kb_ids');
@@ -42,17 +42,6 @@ const AssistantSetting = ({
return e?.fileList;
};
- const handleTtsChange = useCallback(
- (checked: boolean) => {
- if (checked && !data.tts_id) {
- message.error(`Please set TTS model firstly.
- Setting >> Model providers >> System model settings`);
- form.setFieldValue(['prompt_config', 'tts'], false);
- }
- },
- [data, form],
- );
-
const uploadButton = (