mirror of
https://github.com/run-llama/workflows-ts.git
synced 2026-07-20 21:59:32 -04:00
demo: support async context on browser
This commit is contained in:
@@ -15,8 +15,8 @@ const stopEvent = workflowEvent<string>();
|
||||
const workflow = createWorkflow();
|
||||
|
||||
workflow.handle([startEvent], () => {
|
||||
const context = getContext();
|
||||
setTimeout(() => {
|
||||
const context = getContext();
|
||||
context.sendEvent(stopEvent.with("Hello, World!"));
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user