Skip to content

Commit 3eb7f60

Browse files
authored
Open workflow copilot by default when no blocks exist (#4625)
1 parent 36f499a commit 3eb7f60

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

skyvern-frontend/src/routes/workflows/editor/Workspace.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ function Workspace({
248248
const [toDeleteCacheKeyValue, setToDeleteCacheKeyValue] = useState<
249249
string | null
250250
>(null);
251-
const [isCopilotOpen, setIsCopilotOpen] = useState(false);
251+
const [isCopilotOpen, setIsCopilotOpen] = useState(
252+
() => !initialNodes.some(isWorkflowBlockNode),
253+
);
252254
const [copilotMessageCount, setCopilotMessageCount] = useState(0);
253255
const copilotButtonRef = useRef<HTMLButtonElement>(null);
254256
const [

0 commit comments

Comments
 (0)