From 38f47956cd72c74431804b99fd4c205729487383 Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Thu, 5 Sep 2024 14:04:45 +0800 Subject: [PATCH] fix: ts (#2621) --- .../ChatContainer/PluginRunBox/components/RenderOutput.tsx | 3 --- .../src/components/core/chat/components/AIResponseBox.tsx | 7 +++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/components/RenderOutput.tsx b/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/components/RenderOutput.tsx index b78d76e61..196bf4c58 100644 --- a/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/components/RenderOutput.tsx +++ b/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/components/RenderOutput.tsx @@ -32,11 +32,8 @@ const RenderOutput = () => { ); })} diff --git a/projects/app/src/components/core/chat/components/AIResponseBox.tsx b/projects/app/src/components/core/chat/components/AIResponseBox.tsx index f4353ff44..4f59b232c 100644 --- a/projects/app/src/components/core/chat/components/AIResponseBox.tsx +++ b/projects/app/src/components/core/chat/components/AIResponseBox.tsx @@ -1,5 +1,4 @@ import Markdown from '@/components/Markdown'; -import { CodeClassNameEnum } from '@/components/Markdown/utils'; import { Accordion, AccordionButton, @@ -17,7 +16,7 @@ import { ToolModuleResponseItemType, UserChatItemValueItemType } from '@fastgpt/global/core/chat/type'; -import React, { useMemo } from 'react'; +import React from 'react'; import MyIcon from '@fastgpt/web/components/common/Icon'; import Avatar from '@fastgpt/web/components/common/Avatar'; import { SendPromptFnType } from '../ChatContainer/ChatBox/type'; @@ -31,7 +30,7 @@ type props = { value: UserChatItemValueItemType | AIChatItemValueItemType; isLastChild: boolean; isChatting: boolean; - onSendMessage: SendPromptFnType; + onSendMessage?: SendPromptFnType; }; const RenderText = React.memo(function RenderText({ @@ -139,7 +138,7 @@ const RenderInteractive = React.memo( }: { isChatting: boolean; interactive: InteractiveNodeResponseItemType; - onSendMessage: SendPromptFnType; + onSendMessage?: SendPromptFnType; chatHistories: ChatSiteItemType[]; }) { return (