shu/fix totp script gen (#3423)
This commit is contained in:
@@ -999,6 +999,8 @@ class ForgeAgent:
|
||||
)
|
||||
detailed_agent_step_output.llm_response = json_response
|
||||
actions = parse_actions(task, step.step_id, step.order, scraped_page, json_response["actions"])
|
||||
if context:
|
||||
context.pop_totp_code(task.task_id)
|
||||
except NoTOTPVerificationCodeFound:
|
||||
actions = [
|
||||
TerminateAction(
|
||||
@@ -3003,7 +3005,6 @@ class ForgeAgent:
|
||||
browser_state,
|
||||
scraped_page,
|
||||
verification_code_check=False,
|
||||
expire_verification_code=True,
|
||||
)
|
||||
llm_key_override = task.llm_key
|
||||
if await is_cua_task(task=task):
|
||||
|
||||
@@ -39,6 +39,10 @@ class SkyvernContext:
|
||||
def __str__(self) -> str:
|
||||
return self.__repr__()
|
||||
|
||||
def pop_totp_code(self, task_id: str) -> None:
|
||||
if task_id in self.totp_codes:
|
||||
self.totp_codes.pop(task_id)
|
||||
|
||||
|
||||
_context: ContextVar[SkyvernContext | None] = ContextVar(
|
||||
"Global context",
|
||||
|
||||
Reference in New Issue
Block a user