mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-29 09:44:47 +00:00
Support simpleApp select workflow (#2772)
* fix: share page id error * feat: simple workflow support childApp tool * perf: aichat box animation
This commit is contained in:
@@ -95,7 +95,7 @@ const AIContentCard = React.memo(function AIContentCard({
|
||||
<AIResponseBox
|
||||
key={key}
|
||||
value={value}
|
||||
isLastChild={isLastChild && i === chatValue.length - 1}
|
||||
isLastResponseValue={isLastChild && i === chatValue.length - 1}
|
||||
isChatting={isChatting}
|
||||
/>
|
||||
);
|
||||
|
@@ -33,7 +33,7 @@ const RenderOutput = () => {
|
||||
<AIResponseBox
|
||||
key={key}
|
||||
value={value}
|
||||
isLastChild={true}
|
||||
isLastResponseValue={true}
|
||||
isChatting={isChatting}
|
||||
/>
|
||||
);
|
||||
|
@@ -110,9 +110,9 @@ const RenderPluginInput = ({
|
||||
*
|
||||
</Box>
|
||||
)}
|
||||
{input.label}
|
||||
{t(input.label as any)}
|
||||
</Box>
|
||||
{input.description && <QuestionTip ml={2} label={input.description} />}
|
||||
{input.description && <QuestionTip ml={2} label={t(input.description as any)} />}
|
||||
</Flex>
|
||||
{render}
|
||||
</Box>
|
||||
|
@@ -24,7 +24,7 @@ import { onSendPrompt } from '../ChatContainer/useChat';
|
||||
|
||||
type props = {
|
||||
value: UserChatItemValueItemType | AIChatItemValueItemType;
|
||||
isLastChild: boolean;
|
||||
isLastResponseValue: boolean;
|
||||
isChatting: boolean;
|
||||
};
|
||||
|
||||
@@ -167,11 +167,13 @@ const RenderInteractive = React.memo(function RenderInteractive({
|
||||
);
|
||||
});
|
||||
|
||||
const AIResponseBox = ({ value, isLastChild, isChatting }: props) => {
|
||||
const AIResponseBox = ({ value, isLastResponseValue, isChatting }: props) => {
|
||||
if (value.type === ChatItemValueTypeEnum.text && value.text)
|
||||
return <RenderText showAnimation={isChatting && isLastChild} text={value.text.content} />;
|
||||
return (
|
||||
<RenderText showAnimation={isChatting && isLastResponseValue} text={value.text.content} />
|
||||
);
|
||||
if (value.type === ChatItemValueTypeEnum.tool && value.tools)
|
||||
return <RenderTool showAnimation={isChatting && isLastChild} tools={value.tools} />;
|
||||
return <RenderTool showAnimation={isChatting} tools={value.tools} />;
|
||||
if (
|
||||
value.type === ChatItemValueTypeEnum.interactive &&
|
||||
value.interactive &&
|
||||
|
Reference in New Issue
Block a user