feat(blocks): add ConcatenateListsBlock for list concatenation#11691
feat(blocks): add ConcatenateListsBlock for list concatenation#11691majiayu000 wants to merge 2 commits intoSignificant-Gravitas:devfrom
Conversation
Add a new block that concatenates two or more lists into a single list. Features: - Supports 2 required inputs (list1, list2) - Supports 3 optional inputs (list3, list4, list5) for advanced use - Preserves element order during concatenation - Outputs both the concatenated list and total element count Fixes Significant-Gravitas#11139 Signed-off-by: majiayu000 <1835304752@qq.com>
WalkthroughThe PR adds a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (4)autogpt_platform/backend/**/*.py📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
autogpt_platform/backend/backend/blocks/**/*.py📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
autogpt_platform/{backend,autogpt_libs}/**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/backend/**📄 CodeRabbit inference engine (autogpt_platform/CLAUDE.md)
Files:
🧠 Learnings (4)📚 Learning: 2025-11-25T08:48:33.246ZApplied to files:
📚 Learning: 2025-11-25T08:49:03.583ZApplied to files:
📚 Learning: 2025-11-25T08:49:03.583ZApplied to files:
📚 Learning: 2025-11-25T08:49:03.583ZApplied to files:
🧬 Code graph analysis (1)autogpt_platform/backend/backend/blocks/basic.py (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
🔇 Additional comments (2)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
@coderabbitai review |
| list3: list[Any] = SchemaField( | ||
| description="Optional third list to concatenate", | ||
| default=[], | ||
| advanced=True, | ||
| ) | ||
| list4: list[Any] = SchemaField( | ||
| description="Optional fourth list to concatenate", | ||
| default=[], | ||
| advanced=True, | ||
| ) | ||
| list5: list[Any] = SchemaField( | ||
| description="Optional fifth list to concatenate", | ||
| default=[], | ||
| advanced=True, | ||
| ) |
There was a problem hiding this comment.
is there a better way to hanlde this? it seems --- tedious to upkeep
|
|
||
| def __init__(self): | ||
| super().__init__( | ||
| id="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d", |
There was a problem hiding this comment.
regenerate this using python uuid fucntions
| result = ( | ||
| list(input_data.list1) | ||
| + list(input_data.list2) | ||
| + list(input_data.list3) | ||
| + list(input_data.list4) | ||
| + list(input_data.list5) | ||
| ) | ||
| yield "concatenated_list", result | ||
| yield "total_length", len(result) |
There was a problem hiding this comment.
idk man why do we need five vs two vs 3 here?
…enateListsBlock Signed-off-by: Antigravity AI <antigravity@google.com>
|
Antigravity AI seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
we have decide to merge a competing pr. closing: #11567 |
Summary
Implements a new block that concatenates two or more lists into a single list.
list1,list2) for basic uselist3,list4,list5) for more complex scenariosTest plan
Fixes #11139