Open workflow copilot by default when no blocks exist (#4625)

This commit is contained in:
Shuchang Zheng
2026-02-03 18:13:21 -08:00
committed by GitHub
parent 36f499ab9e
commit 3eb7f60ba8

View File

@@ -248,7 +248,9 @@ function Workspace({
const [toDeleteCacheKeyValue, setToDeleteCacheKeyValue] = useState<
string | null
>(null);
const [isCopilotOpen, setIsCopilotOpen] = useState(false);
const [isCopilotOpen, setIsCopilotOpen] = useState(
() => !initialNodes.some(isWorkflowBlockNode),
);
const [copilotMessageCount, setCopilotMessageCount] = useState(0);
const copilotButtonRef = useRef<HTMLButtonElement>(null);
const [