Fix navigation blocks with engine skyvern-2.0 losing prompt in UI (#4720)
Co-authored-by: Suchintan Singh <suchintan@skyvern.com>
This commit is contained in:
@@ -594,6 +594,7 @@ function convertToNode(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
case "navigation": {
|
case "navigation": {
|
||||||
|
const isV2Engine = block.engine === RunEngine.SkyvernV2;
|
||||||
return {
|
return {
|
||||||
...identifiers,
|
...identifiers,
|
||||||
...common,
|
...common,
|
||||||
@@ -616,8 +617,11 @@ function convertToNode(
|
|||||||
engine: block.engine ?? RunEngine.SkyvernV1,
|
engine: block.engine ?? RunEngine.SkyvernV1,
|
||||||
includeActionHistoryInVerification:
|
includeActionHistoryInVerification:
|
||||||
block.include_action_history_in_verification ?? false,
|
block.include_action_history_in_verification ?? false,
|
||||||
prompt: "",
|
// When engine is SkyvernV2, use navigation_goal as the prompt
|
||||||
maxSteps: MAX_STEPS_DEFAULT,
|
prompt: isV2Engine ? block.navigation_goal ?? "" : "",
|
||||||
|
maxSteps: isV2Engine
|
||||||
|
? block.max_steps_per_run ?? MAX_STEPS_DEFAULT
|
||||||
|
: MAX_STEPS_DEFAULT,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user