From 640a50725874a98a77016135fe504f721c5bbd03 Mon Sep 17 00:00:00 2001
From: sw3205933776 <3205933776@qq.com>
Date: Wed, 12 Nov 2025 18:11:07 +0800
Subject: [PATCH 1/2] feat: show document agent workspace only when agent has
tasks
---
src/components/WorkFlow/node.tsx | 3 ++-
utils/__pycache__/__init__.cpython-310.pyc | Bin 214 -> 193 bytes
.../traceroot_wrapper.cpython-310.pyc | Bin 2544 -> 2523 bytes
3 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/components/WorkFlow/node.tsx b/src/components/WorkFlow/node.tsx
index 512e836f..b6af9eca 100644
--- a/src/components/WorkFlow/node.tsx
+++ b/src/components/WorkFlow/node.tsx
@@ -451,7 +451,8 @@ export function Node({ id, data }: NodeProps) {
)}
)}
- {data.type === "document_agent" && (
+ {data.type === "document_agent" &&
+ data?.agent?.tasks && data.agent.tasks.length > 0 && (
diff --git a/utils/__pycache__/__init__.cpython-310.pyc b/utils/__pycache__/__init__.cpython-310.pyc
index 57ecb1ad7b408569a80294e611f22351efca17cb..10d1d4a69c028b0fa2e5b31e6afd01340e2b871d 100644
GIT binary patch
delta 49
zcmcb{c#x4hpO=@50SMMha!ll|l2UQDig7F`%FjwoE{RFaOi#@#i773~%qfnUxJ3y7
DNuv*y
delta 70
zcmX@ec#V-epO=@50SFE^@=WBe(znzPElw>e)=$YVP0vXz)^|xQ&MwI>(09&HNmX!4
YEKb!=%}h_tE7314$;>I%pEzF$0P#E*KL7v#
diff --git a/utils/__pycache__/traceroot_wrapper.cpython-310.pyc b/utils/__pycache__/traceroot_wrapper.cpython-310.pyc
index b8d9747f6f81fdae3f1f8ee704ee23bf51b8513c..d695ee21dc2c1d82d5dfa3d82d7694ce6bef45e3 100644
GIT binary patch
delta 52
zcmew$d|Q}1pO=@50SMMha%|*U!QcY!%~JP?VpQnp_f-nwg%OR}xcNl9^K+vss1t
G3>yHFvk=Vy
delta 73
zcmcaD{6UyIpO=@50SFE^@@(XO#iZ|~A6lGRRIHzpUz(niSgh}oTAW>yU!d=tpOUKJ
blvtdqpPHGTnpdJ
Date: Thu, 13 Nov 2025 17:46:59 +0800
Subject: [PATCH 2/2] minor update
---
src/components/WorkFlow/node.tsx | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/components/WorkFlow/node.tsx b/src/components/WorkFlow/node.tsx
index b6af9eca..3af1e022 100644
--- a/src/components/WorkFlow/node.tsx
+++ b/src/components/WorkFlow/node.tsx
@@ -332,7 +332,7 @@ export function Node({ id, data }: NodeProps) {
? `${agentMap[data.type]?.borderColor} z-50`
: "border-worker-border-default z-10"
} transition-all duration-300 ease-in-out ${
- data.agent?.tasks.length === 0 && "opacity-30"
+ (data.agent?.tasks?.length ?? 0) === 0 && "opacity-30"
}`}
>
)}
- {data.type === "document_agent" &&
- data?.agent?.tasks && data.agent.tasks.length > 0 && (
-
-
-
+ {data.type === "document_agent" &&
+ data?.agent?.tasks &&
+ data.agent.tasks.length > 0 && (
+
-
- )}
+ )}
{data.type === "developer_agent" &&
data?.agent?.tasks &&