mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-10 23:05:17 -05:00
### Changes 🏗️ This PR adds a new utility block to the basic blocks collection. This block provides a simple way to reverse the order of elements in any list. **New Features:** - Added class in - Block accepts any list as input and returns the same list with elements in reversed order - Preserves the original list (creates a copy before reversing) - Works with lists containing any type of elements **Technical Details:** - Block ID: - Category: - Input: - The list to reverse (accepts ) - Output: - The list with elements in reversed order - Includes test input/output for validation ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Created an agent with the ReverseListOrderBlock - [x] Tested with various list types (numbers, strings, mixed types) - [x] Verified the block preserves the original list - [x] Confirmed the block correctly reverses the order of elements - [x] Tested with empty lists and single-element lists - [x] Verified the block integrates properly with other blocks in a workflow #### For configuration changes: - [x] is updated or already compatible with my changes - [x] is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) **Note:** No configuration changes required - this is a pure code addition that uses the existing block framework. Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com>