diff --git a/skyvern/forge/prompts/skyvern/single-click-action.j2 b/skyvern/forge/prompts/skyvern/single-click-action.j2 index 0dcb0287..9759d482 100644 --- a/skyvern/forge/prompts/skyvern/single-click-action.j2 +++ b/skyvern/forge/prompts/skyvern/single-click-action.j2 @@ -40,7 +40,12 @@ HTML elements from `{{ current_url }}`: ``` {{ elements }} ``` - +{% if action_history %} +Consider the action history from the previous steps and the screenshot together, if actions from the previous steps don't yield positive impact, try to take an action on a different element. +Action history from previous steps: +``` +{{ action_history }} +```{% endif %} Current datetime, ISO format: ``` {{ local_datetime }} diff --git a/skyvern/forge/prompts/skyvern/single-input-action.j2 b/skyvern/forge/prompts/skyvern/single-input-action.j2 index 24b32c55..c1305ae8 100644 --- a/skyvern/forge/prompts/skyvern/single-input-action.j2 +++ b/skyvern/forge/prompts/skyvern/single-input-action.j2 @@ -46,7 +46,12 @@ HTML elements from `{{ current_url }}`: ``` {{ elements }} ``` - +{% if action_history %} +Consider the action history from the previous steps and the screenshot together, if actions from the previous steps don't yield positive impact, try to take an action on a different element. +Action history from previous steps: +``` +{{ action_history }} +```{% endif %} Current datetime, ISO format: ``` {{ local_datetime }} diff --git a/skyvern/forge/prompts/skyvern/single-select-action.j2 b/skyvern/forge/prompts/skyvern/single-select-action.j2 index e3a92978..efbf9f00 100644 --- a/skyvern/forge/prompts/skyvern/single-select-action.j2 +++ b/skyvern/forge/prompts/skyvern/single-select-action.j2 @@ -47,7 +47,12 @@ HTML elements from `{{ current_url }}`: ``` {{ elements }} ``` - +{% if action_history %} +Consider the action history from the previous steps and the screenshot together, if actions from the previous steps don't yield positive impact, try to take an action on a different element. +Action history from previous steps: +``` +{{ action_history }} +```{% endif %} Current datetime, ISO format: ``` {{ local_datetime }} diff --git a/skyvern/forge/prompts/skyvern/single-upload-action.j2 b/skyvern/forge/prompts/skyvern/single-upload-action.j2 index edd4ca53..65acb686 100644 --- a/skyvern/forge/prompts/skyvern/single-upload-action.j2 +++ b/skyvern/forge/prompts/skyvern/single-upload-action.j2 @@ -34,7 +34,12 @@ HTML elements from `{{ current_url }}`: ``` {{ elements }} ``` - +{% if action_history %} +Consider the action history from the previous steps and the screenshot together, if actions from the previous steps don't yield positive impact, try to take an action on a different element. +Action history from previous steps: +``` +{{ action_history }} +```{% endif %} Current datetime, ISO format: ``` {{ local_datetime }}