fix: hide agent upload slots by default
This commit is contained in:
parent
b99eb6cf7a
commit
aa9abff5af
@ -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">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user