fix: hide agent upload slots by default
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-03-21 22:36:02 +08:00
parent b99eb6cf7a
commit aa9abff5af

View File

@ -1055,23 +1055,9 @@ export function AgentGenerationWorkspaceDarkV2({
useEffect(() => { useEffect(() => {
if (!selectedAgentPresetId || !hasAgentUploadSlots) { if (!selectedAgentPresetId || !hasAgentUploadSlots) {
setIsAttachmentSlotExpanded(true);
return;
}
if (filledAttachmentCount < requiredUploadCount) {
setIsAttachmentSlotExpanded(true);
return;
}
if (hasMaterialStep) {
setIsAttachmentSlotExpanded(false); setIsAttachmentSlotExpanded(false);
} }
}, [ }, [hasAgentUploadSlots, selectedAgentPresetId]);
filledAttachmentCount,
hasMaterialStep,
hasAgentUploadSlots,
requiredUploadCount,
selectedAgentPresetId,
]);
useEffect(() => { useEffect(() => {
if (!selectedAgentPresetId) { if (!selectedAgentPresetId) {
@ -1969,9 +1955,7 @@ export function AgentGenerationWorkspaceDarkV2({
</div> </div>
) : null} ) : null}
{(!hasMaterialStep || !hasSatisfiedSlotRequirement || isAttachmentSlotExpanded) {hasAgentUploadSlots && isAttachmentSlotExpanded ? attachmentSlotPanel : null}
? attachmentSlotPanel
: null}
<div className="rounded-[28px] border border-white/12 bg-white/[0.02] p-4"> <div className="rounded-[28px] border border-white/12 bg-white/[0.02] p-4">
<h3 className="mb-3 flex items-center gap-2 text-sm font-semibold text-white"> <h3 className="mb-3 flex items-center gap-2 text-sm font-semibold text-white">