decrease max svg parsing (#4430)
This commit is contained in:
@@ -374,6 +374,7 @@ class Settings(BaseSettings):
|
|||||||
BITWARDEN_SERVER_PORT: int = 8002
|
BITWARDEN_SERVER_PORT: int = 8002
|
||||||
|
|
||||||
SVG_MAX_LENGTH: int = 100000
|
SVG_MAX_LENGTH: int = 100000
|
||||||
|
SVG_MAX_PARSING_ELEMENT_CNT: int = 3000
|
||||||
|
|
||||||
ENABLE_LOG_ARTIFACTS: bool = False
|
ENABLE_LOG_ARTIFACTS: bool = False
|
||||||
ENABLE_CODE_BLOCK: bool = True
|
ENABLE_CODE_BLOCK: bool = True
|
||||||
|
|||||||
@@ -504,7 +504,7 @@ class AgentFunction:
|
|||||||
task: Task | None = None,
|
task: Task | None = None,
|
||||||
step: Step | None = None,
|
step: Step | None = None,
|
||||||
) -> CleanupElementTreeFunc:
|
) -> CleanupElementTreeFunc:
|
||||||
MAX_ELEMENT_CNT = 3000
|
MAX_ELEMENT_CNT = settings.SVG_MAX_PARSING_ELEMENT_CNT
|
||||||
|
|
||||||
@TraceManager.traced_async(ignore_input=True)
|
@TraceManager.traced_async(ignore_input=True)
|
||||||
async def cleanup_element_tree_func(frame: Page | Frame, url: str, element_tree: list[dict]) -> list[dict]:
|
async def cleanup_element_tree_func(frame: Page | Frame, url: str, element_tree: list[dict]) -> list[dict]:
|
||||||
|
|||||||
Reference in New Issue
Block a user