@@ -55,21 +55,21 @@ const workflow = new WorkflowManager(components.workflow);
5555
5656export const weatherAgentWorkflow = workflow . define ( {
5757 args : { location : v . string ( ) , threadId : v . string ( ) } ,
58- handler : async ( step , { location, threadId } ) : Promise < void > => {
59- const weatherQ = await saveMessage ( step , components . agent , {
58+ handler : async ( ctx , { location, threadId } ) : Promise < void > => {
59+ const weatherQ = await saveMessage ( ctx , components . agent , {
6060 threadId,
6161 prompt : `What is the weather in ${ location } ?` ,
6262 } ) ;
63- const forecast = await step . runAction (
63+ const forecast = await ctx . runAction (
6464 internal . workflows . chaining . getForecast ,
6565 { promptMessageId : weatherQ . messageId , threadId } ,
6666 { retry : true } ,
6767 ) ;
68- const fashionQ = await saveMessage ( step , components . agent , {
68+ const fashionQ = await saveMessage ( ctx , components . agent , {
6969 threadId,
7070 prompt : `What should I wear based on the weather?` ,
7171 } ) ;
72- const fashion = await step . runAction (
72+ const fashion = await ctx . runAction (
7373 internal . workflows . chaining . getFashionAdvice ,
7474 { promptMessageId : fashionQ . messageId , threadId } ,
7575 {
0 commit comments