mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 14:37:59 -05:00
fix: ensure artifacts are not duplicated
This commit is contained in:
@@ -149,10 +149,12 @@ def process_task_state(
|
|||||||
Returns:
|
Returns:
|
||||||
Result dictionary if terminal/actionable state, None otherwise
|
Result dictionary if terminal/actionable state, None otherwise
|
||||||
"""
|
"""
|
||||||
|
should_extract = result_parts is None
|
||||||
if result_parts is None:
|
if result_parts is None:
|
||||||
result_parts = []
|
result_parts = []
|
||||||
|
|
||||||
if a2a_task.status.state == TaskState.completed:
|
if a2a_task.status.state == TaskState.completed:
|
||||||
|
if should_extract:
|
||||||
extracted_parts = extract_task_result_parts(a2a_task)
|
extracted_parts = extract_task_result_parts(a2a_task)
|
||||||
result_parts.extend(extracted_parts)
|
result_parts.extend(extracted_parts)
|
||||||
if a2a_task.history:
|
if a2a_task.history:
|
||||||
|
|||||||
Reference in New Issue
Block a user