mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
fix(console): flashing on run
This commit is contained in:
@@ -19,7 +19,7 @@ export function useWorkflowExecution() {
|
||||
const { blocks, edges, loops } = useWorkflowStore()
|
||||
const { activeWorkflowId } = useWorkflowRegistry()
|
||||
const { addNotification } = useNotificationStore()
|
||||
const { toggleConsole, isOpen } = useConsoleStore()
|
||||
const { toggleConsole } = useConsoleStore()
|
||||
const { getAllVariables } = useEnvironmentStore()
|
||||
const { isExecuting, setIsExecuting } = useExecutionStore()
|
||||
const [executionResult, setExecutionResult] = useState<ExecutionResult | null>(null)
|
||||
@@ -59,8 +59,11 @@ export function useWorkflowExecution() {
|
||||
if (!activeWorkflowId) return
|
||||
setIsExecuting(true)
|
||||
|
||||
// Get the current console state directly from the store
|
||||
const currentIsOpen = useConsoleStore.getState().isOpen
|
||||
|
||||
// Open console if it's not already open
|
||||
if (!isOpen) {
|
||||
if (!currentIsOpen) {
|
||||
toggleConsole()
|
||||
}
|
||||
|
||||
@@ -194,7 +197,6 @@ export function useWorkflowExecution() {
|
||||
edges,
|
||||
loops,
|
||||
addNotification,
|
||||
isOpen,
|
||||
toggleConsole,
|
||||
getAllVariables,
|
||||
setIsExecuting,
|
||||
|
||||
Reference in New Issue
Block a user