apply scroll_amount_multiplier (#2268)

This commit is contained in:
Shuchang Zheng
2025-05-01 00:09:49 -07:00
committed by GitHub
parent a7263f579b
commit d107a7563c
2 changed files with 6 additions and 4 deletions

View File

@@ -34,3 +34,4 @@ class ScrapeType(StrEnum):
SCRAPE_TYPE_ORDER = [ScrapeType.NORMAL, ScrapeType.NORMAL, ScrapeType.RELOAD]
DEFAULT_MAX_TOKENS = 100000
MAX_IMAGE_MESSAGES = 10
SCROLL_AMOUNT_MULTIPLIER = 100

View File

@@ -4,6 +4,7 @@ import structlog
from openai.types.responses.response import Response as OpenAIResponse
from pydantic import ValidationError
from skyvern.constants import SCROLL_AMOUNT_MULTIPLIER
from skyvern.exceptions import NoTOTPVerificationCodeFound, UnsupportedActionType
from skyvern.forge import app
from skyvern.forge.prompts import prompt_engine
@@ -552,15 +553,15 @@ async def parse_anthropic_actions(
scroll_amount = tool_call_input.get("scroll_amount")
if scroll_direction == "up":
scroll_x = 0
scroll_y = -scroll_amount
scroll_y = -scroll_amount * SCROLL_AMOUNT_MULTIPLIER
elif scroll_direction == "down":
scroll_x = 0
scroll_y = scroll_amount
scroll_y = scroll_amount * SCROLL_AMOUNT_MULTIPLIER
elif scroll_direction == "left":
scroll_x = -scroll_amount
scroll_x = -scroll_amount * SCROLL_AMOUNT_MULTIPLIER
scroll_y = 0
elif scroll_direction == "right":
scroll_x = scroll_amount
scroll_x = scroll_amount * SCROLL_AMOUNT_MULTIPLIER
scroll_y = 0
else:
LOG.warning(