mirror of
https://github.com/run-llama/workflows-ts.git
synced 2026-07-19 09:35:53 -04:00
[PR #130] [MERGED] Add workflow.handle([or(ev1, ev2)], ...) support
#132
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/run-llama/workflows-ts/pull/130
Author: @logan-markewich
Created: 7/20/2025
Status: ✅ Merged
Merged: 7/22/2025
Merged by: @logan-markewich
Base:
main← Head:logan/add_handle_any📝 Commits (10+)
cf6c71dattempt at .handleAny9b249d7Use or() syntax81f9186Use or() syntax536336cclean importc5c3bacfix typesead891csimplify further56d2ce6clean up old code6a6745drevert workflow changes66a4196remove unused import593cb62changeset📊 Changes
4 files changed (+166 additions, -0 deletions)
View changed files
➕
.changeset/big-pandas-stay.md(+5 -0)📝
packages/core/src/core/event.ts(+73 -0)📝
packages/core/src/core/index.ts(+2 -0)📝
packages/core/tests/core/context-api.spec.ts(+86 -0)📄 Description
Currently
.handle([...])accepts one or more events in the handler array. However, this means that the workflow step handler is only triggered when ALL events are present.Instead, its often useful to trigger on any event type in the handler array, especially when writing loops.
workflow.handleAny()is an attempt at this. I wont feel bad if you hate it, its 80% written by claude🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.