Skip to content

Commit d7fb690

Browse files
Apply suggestion from @Tehsmash
Co-authored-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
1 parent 66073cf commit d7fb690

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/a2a/utils/task.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def apply_history_length(task: Task, history_length: int | None) -> Task:
9696
task_copy = Task()
9797
task_copy.CopyFrom(task)
9898
# Clear and re-add history items
99-
del task_copy.history[:]
100-
task_copy.history.extend(limited_history)
99+
task_copy.history[:] = limited_history
101100
return task_copy
102101
return task

0 commit comments

Comments
 (0)