Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix: add __repr__ to Action base class to prevent log serialization errors (#5071)
Shuchang Zhenge164baefd504
diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunOutput.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunOutput.tsxindex 465625325..6dce7f0d5 100644--- a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunOutput.tsx+++ b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunOutput.tsx@@ -94,46 +94,30 @@ function WorkflowRunOutput() {) : showExtractedInformation ? (<div className="space-y-2"><h2>Extracted Information</h2>- <div- style={{- resize: "vertical",- overflow: "hidden",- minHeight: "96px",- height: "200px",- }}- >- <CodeEditor- language="json"- value={JSON.stringify(- (hasExtractedInformation(activeBlock.output) &&- activeBlock.output.extracted_information) ??- null,+ <CodeEditor+ language="json"+ value={JSON.stringify(+ (hasExtractedInformation(activeBlock.output) &&+ activeBlock.output.extracted_information) ??null,- 2,- )}- readOnly- fullHeight- />- </div>+ null,+ 2,+ )}+ minHeight="96px"+ maxHeight="200px"+ readOnly+ /></div>) : activeBlock.output !== null ? (<div className="space-y-2"><h2>Output</h2>- <div- style={{- resize: "vertical",- overflow: "hidden",- minHeight: "96px",- height: "200px",- }}- >- <CodeEditor- language="json"- value={JSON.stringify(activeBlock.output, null, 2)}- readOnly- fullHeight- />- </div>+ <CodeEditor+ language="json"+ value={JSON.stringify(activeBlock.output, null, 2)}+ minHeight="96px"+ maxHeight="200px"+ readOnly+ /></div>) : (<div>This block has no outputs</div>@@ -145,42 +129,26 @@ function WorkflowRunOutput() {<div className="rounded bg-slate-elevation2 p-6"><div className="space-y-4"><h1 className="text-lg font-bold">Task 2.0 Output</h1>- <div- style={{- resize: "vertical",- overflow: "hidden",- minHeight: "96px",- height: "200px",- }}- >- <CodeEditor- language="json"- value={JSON.stringify(observerOutput, null, 2)}- readOnly- fullHeight- />- </div>+ <CodeEditor+ language="json"+ value={JSON.stringify(observerOutput, null, 2)}+ readOnly+ minHeight="96px"+ maxHeight="200px"+ /></div></div>) : null}<div className="rounded bg-slate-elevation2 p-6"><div className="space-y-4"><h1 className="text-lg font-bold">Workflow Run Outputs</h1>- <div- style={{- resize: "vertical",- overflow: "hidden",- minHeight: "96px",- height: "200px",- }}- >- <CodeEditor- language="json"- value={outputs ? JSON.stringify(outputs, null, 2) : ""}- readOnly- fullHeight- />- </div>+ <CodeEditor+ language="json"+ value={outputs ? JSON.stringify(outputs, null, 2) : ""}+ readOnly+ minHeight="96px"+ maxHeight="200px"+ /></div></div><div className="rounded bg-slate-elevation2 p-6">diff --git a/skyvern/webeye/actions/actions.py b/skyvern/webeye/actions/actions.pyindex 1fea08e7d..e8ff682a7 100644--- a/skyvern/webeye/actions/actions.py+++ b/skyvern/webeye/actions/actions.py@@ -161,6 +161,16 @@ class Action(BaseModel):modified_at: datetime | None = Nonecreated_by: str | None = None+ def __repr__(self) -> str:+ return (+ f"{self.__class__.__name__}("+ f"action_type={self.action_type}, "+ f"element_id={self.element_id}, "+ f"action_id={self.action_id}, "+ f"status={self.status}"+ f")"+ )+def set_has_mini_agent(self) -> None:"""Set the has_mini_agent flag to True if any mini-agent is involved when handling the action.