sim icon indicating copy to clipboard operation
sim copied to clipboard

Router conditional port logic

Open emir-karabeg opened this issue 2 months ago • 2 comments

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


Open in Cursor Open in Web

emir-karabeg avatar Dec 20 '25 22:12 emir-karabeg

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

cursor[bot] avatar Dec 20 '25 22:12 cursor[bot]

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Dec 20, 2025 10:09pm

vercel[bot] avatar Dec 20 '25 22:12 vercel[bot]