diff --git a/components/script-renderer/ScriptRenderer.tsx b/components/script-renderer/ScriptRenderer.tsx index 3ae72ad..b4d63df 100644 --- a/components/script-renderer/ScriptRenderer.tsx +++ b/components/script-renderer/ScriptRenderer.tsx @@ -14,9 +14,10 @@ interface ScriptRendererProps { isPauseWorkFlow: boolean; applyScript: any; mode: string; + from: string; } -export const ScriptRenderer: React.FC = ({ data, setIsPauseWorkFlow, setAnyAttribute, isPauseWorkFlow, applyScript, mode }) => { +export const ScriptRenderer: React.FC = ({ data, setIsPauseWorkFlow, setAnyAttribute, isPauseWorkFlow, applyScript, mode, from }) => { const [activeBlockId, setActiveBlockId] = useState(null); const [hoveredBlockId, setHoveredBlockId] = useState(null); const contentRefs = useRef<{ [key: string]: HTMLDivElement | null }>({}); @@ -72,7 +73,7 @@ export const ScriptRenderer: React.FC = ({ data, setIsPause default: return

{ - isInit ? ( + (isInit && from !== 'tab') ? ( ) : ( {content.text} diff --git a/components/ui/script-tab-content.tsx b/components/ui/script-tab-content.tsx index 887c4c8..1cb1e71 100644 --- a/components/ui/script-tab-content.tsx +++ b/components/ui/script-tab-content.tsx @@ -43,6 +43,7 @@ export function ScriptTabContent({ isPauseWorkFlow={isPauseWorkFlow} applyScript={applyScript} mode='manual' + from='tab' />