decrease max svg parsing (#4430)

This commit is contained in:
LawyZheng
2026-01-10 10:52:47 +08:00
committed by GitHub
parent 2ce6228478
commit dad3590d7a
2 changed files with 2 additions and 1 deletions

View File

@@ -374,6 +374,7 @@ class Settings(BaseSettings):
BITWARDEN_SERVER_PORT: int = 8002
SVG_MAX_LENGTH: int = 100000
SVG_MAX_PARSING_ELEMENT_CNT: int = 3000
ENABLE_LOG_ARTIFACTS: bool = False
ENABLE_CODE_BLOCK: bool = True

View File

@@ -504,7 +504,7 @@ class AgentFunction:
task: Task | None = None,
step: Step | None = None,
) -> CleanupElementTreeFunc:
MAX_ELEMENT_CNT = 3000
MAX_ELEMENT_CNT = settings.SVG_MAX_PARSING_ELEMENT_CNT
@TraceManager.traced_async(ignore_input=True)
async def cleanup_element_tree_func(frame: Page | Frame, url: str, element_tree: list[dict]) -> list[dict]: