mirror of https://github.com/langgenius/dify.git
hide node info in chat
This commit is contained in:
parent
a771d59b1e
commit
096cc74373
|
|
@ -90,7 +90,7 @@ const Answer: FC<AnswerProps> = ({
|
|||
}
|
||||
{
|
||||
workflowProcess && (
|
||||
<WorkflowProcess data={workflowProcess} />
|
||||
<WorkflowProcess data={workflowProcess} hideInfo />
|
||||
)
|
||||
}
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,11 +16,13 @@ type WorkflowProcessProps = {
|
|||
data: WorkflowProcess
|
||||
grayBg?: boolean
|
||||
expand?: boolean
|
||||
hideInfo?: boolean
|
||||
}
|
||||
const WorkflowProcessItem = ({
|
||||
data,
|
||||
grayBg,
|
||||
expand = false,
|
||||
hideInfo = false,
|
||||
}: WorkflowProcessProps) => {
|
||||
const { t } = useTranslation()
|
||||
const [collapse, setCollapse] = useState(!expand)
|
||||
|
|
@ -87,6 +89,7 @@ const WorkflowProcessItem = ({
|
|||
<NodePanel
|
||||
className='!p-0'
|
||||
nodeInfo={node}
|
||||
hideInfo={hideInfo}
|
||||
/>
|
||||
</div>
|
||||
))
|
||||
|
|
|
|||
|
|
@ -14,9 +14,10 @@ import type { NodeTracing } from '@/types/workflow'
|
|||
type Props = {
|
||||
nodeInfo: NodeTracing
|
||||
className?: string
|
||||
hideInfo?: boolean
|
||||
}
|
||||
|
||||
const NodePanel: FC<Props> = ({ nodeInfo, className }) => {
|
||||
const NodePanel: FC<Props> = ({ nodeInfo, className, hideInfo = false }) => {
|
||||
const [collapseState, setCollapseState] = useState<boolean>(true)
|
||||
const { t } = useTranslation()
|
||||
|
||||
|
|
@ -59,7 +60,7 @@ const NodePanel: FC<Props> = ({ nodeInfo, className }) => {
|
|||
/>
|
||||
<BlockIcon className='shrink-0 mr-2' type={nodeInfo.node_type} />
|
||||
<div className='grow text-gray-700 text-[13px] leading-[16px] font-semibold truncate' title={nodeInfo.title}>{nodeInfo.title}</div>
|
||||
{nodeInfo.status !== 'running' && (
|
||||
{nodeInfo.status !== 'running' && !hideInfo && (
|
||||
<div className='shrink-0 text-gray-500 text-xs leading-[18px]'>{`${getTime(nodeInfo.elapsed_time || 0)} · ${getTokenCount(nodeInfo.execution_metadata?.total_tokens || 0)} tokens`}</div>
|
||||
)}
|
||||
{nodeInfo.status === 'succeeded' && (
|
||||
|
|
|
|||
Loading…
Reference in New Issue