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(() => {
if (!selectedAgentPresetId || !hasAgentUploadSlots) {
setIsAttachmentSlotExpanded(true);
return;
}
if (filledAttachmentCount < requiredUploadCount) {
setIsAttachmentSlotExpanded(true);
return;
}
if (hasMaterialStep) {
setIsAttachmentSlotExpanded(false);
}
}, [
filledAttachmentCount,
hasMaterialStep,
hasAgentUploadSlots,
requiredUploadCount,
selectedAgentPresetId,
]);
}, [hasAgentUploadSlots, selectedAgentPresetId]);
useEffect(() => {
if (!selectedAgentPresetId) {
@ -1969,9 +1955,7 @@ export function AgentGenerationWorkspaceDarkV2({
</div>
) : null}
{(!hasMaterialStep || !hasSatisfiedSlotRequirement || isAttachmentSlotExpanded)
? attachmentSlotPanel
: null}
{hasAgentUploadSlots && isAttachmentSlotExpanded ? attachmentSlotPanel : null}
<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">