Skip to content

Commit e2e0d71

Browse files
Update src/a2a/utils/task.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 3eb4bf6 commit e2e0d71

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/a2a/utils/task.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ def apply_history_length(
119119
history_length = config.history_length
120120

121121
if history_length == 0:
122+
if not task.history:
123+
return task
122124
task_copy = Task()
123125
task_copy.CopyFrom(task)
124126
task_copy.ClearField('history')

0 commit comments

Comments
 (0)