diff --git a/web/app/components/base/chat/chat/answer/index.tsx b/web/app/components/base/chat/chat/answer/index.tsx index 3722556931..993a3a5519 100644 --- a/web/app/components/base/chat/chat/answer/index.tsx +++ b/web/app/components/base/chat/chat/answer/index.tsx @@ -137,24 +137,14 @@ const Answer: FC = ({ /> ) } - {/** Render the normal steps */} + {/** Render workflow process */} { - workflowProcess && !hideProcessDetail && ( + workflowProcess && ( - ) - } - {/** Hide workflow steps by it's settings in siteInfo */} - { - workflowProcess && hideProcessDetail && appData && ( - ) } diff --git a/web/app/components/base/chat/chat/answer/workflow-process.tsx b/web/app/components/base/chat/chat/answer/workflow-process.tsx index 4651ff4ab1..0537d3c58b 100644 --- a/web/app/components/base/chat/chat/answer/workflow-process.tsx +++ b/web/app/components/base/chat/chat/answer/workflow-process.tsx @@ -39,6 +39,8 @@ const WorkflowProcessItem = ({ setCollapse(!expand) }, [expand]) + if (readonly) return null + return (
!readonly && setCollapse(!collapse)} + className={cn('flex cursor-pointer items-center', !collapse && 'px-1.5')} + onClick={() => setCollapse(!collapse)} > { running && ( @@ -72,10 +74,10 @@ const WorkflowProcessItem = ({
{t('workflow.common.workflowProcess')}
- {!readonly && } +
{ - !collapse && !readonly && ( + !collapse && (
{