fix: Frontend Displays Empty Tasks – Investigation Needed issue 436 (#462)

This commit is contained in:
Wendong-Fan 2025-10-06 15:30:59 +08:00 committed by GitHub
commit 8918cc736d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -132,7 +132,11 @@ class Workforce(BaseWorkforce):
continue
# Find task content
task_obj = get_camel_task(item.task_id, tasks)
content = task_obj.content if task_obj else ""
if task_obj is None:
logger.warning(f"[WF] WARN: Task {item.task_id} not found in tasks list during ASSIGN phase. This may indicate a task tree inconsistency.")
content = ""
else:
content = task_obj.content
# Asynchronously send waiting notification
task = asyncio.create_task(
task_lock.put_queue(

View file

@ -589,6 +589,13 @@ const chatStore = create<ChatStore>()(
const taskRunningIndex = taskRunning!.findIndex((task: TaskInfo) => task.id === task_id);
// Skip tasks with empty content only if the task doesn't exist in taskInfo
// If task exists in taskInfo, we should still process status updates
if ((!content || content.trim() === "") && !task) {
console.warn(`Skipping task ${task_id} with empty content and not found in taskInfo`);
return;
}
if (assigneeAgentIndex === -1) return;
const taskAgent = taskAssigning![assigneeAgentIndex];