From 3cb3a0e7ce76902f6ee577d23b0d53941ba42141 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Sat, 4 Jan 2025 12:30:10 -0800 Subject: [PATCH] use the first screenshot for llm thought (#1487) --- .../routes/workflows/workflowRun/ObserverThoughtScreenshot.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/ObserverThoughtScreenshot.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/ObserverThoughtScreenshot.tsx index 5daa2389..e90d4bd2 100644 --- a/skyvern-frontend/src/routes/workflows/workflowRun/ObserverThoughtScreenshot.tsx +++ b/skyvern-frontend/src/routes/workflows/workflowRun/ObserverThoughtScreenshot.tsx @@ -39,7 +39,8 @@ function ObserverThoughtScreenshot({ observerThoughtId, taskStatus }: Props) { (artifact) => artifact.artifact_type === ArtifactType.LLMScreenshot, ); - const screenshot = llmScreenshots?.[0]; + // use the last screenshot as the llmScreenshots are in reverse order + const screenshot = llmScreenshots?.[llmScreenshots.length - 1]; if (isLoading) { return (