sim
sim copied to clipboard
Router conditional port logic
Summary
This PR transforms the Router block from an LLM-based routing mechanism into a conditional logic block, mirroring the functionality of the Conditional block. It introduces if/else if/else conditions for explicit path selection, enhancing control and predictability. Existing router blocks will default to the first output port, ensuring backward compatibility.
Fixes #
Type of Change
- [ ] Bug fix
- [x] New feature
- [ ] Breaking change
- [ ] Documentation
- [ ] Other: ___________
Testing
The changes were verified by:
- Running unit tests for router handler and edge construction.
- Manual testing of the new router block in the UI, ensuring conditions can be set, connections made, and routes are correctly evaluated.
- Ensuring existing router blocks (pre-change) default to the first output port.
Checklist
- [x] Code follows project style guidelines
- [x] Self-reviewed my changes
- [x] Tests added/updated and passing
- [x] No new warnings introduced
- [x] I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Screenshots/Videos
Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents
The latest updates on your projects. Learn more about Vercel for GitHub.