Integrate v2 task api (#1566)

This commit is contained in:
Shuchang Zheng
2025-01-15 11:41:31 -08:00
committed by GitHub
parent 5c26374f4b
commit 9cd542eae3
10 changed files with 41 additions and 27 deletions

View File

@@ -140,7 +140,7 @@ function WorkflowPostRunParameters() {
</div>
</div>
</div>
{workflowRun.observer_cruise ? (
{workflowRun.observer_task ? (
<div className="rounded bg-slate-elevation2 p-6">
<div className="space-y-4">
<h1 className="text-lg font-bold">Observer Parameters</h1>
@@ -152,7 +152,7 @@ function WorkflowPostRunParameters() {
</h2>
</div>
<AutoResizingTextarea
value={workflowRun.observer_cruise.prompt ?? ""}
value={workflowRun.observer_task.prompt ?? ""}
readOnly
/>
</div>

View File

@@ -77,7 +77,7 @@ function WorkflowRunOutput() {
? formatExtractedInformation(outputs)
: outputs;
const fileUrls = workflowRun?.downloaded_file_urls ?? [];
const observerOutput = workflowRun?.observer_cruise?.output;
const observerOutput = workflowRun?.observer_task?.output;
return (
<div className="space-y-5">

View File

@@ -77,9 +77,7 @@ function WorkflowRunOverview() {
/>
)}
{isObserverThought(selection) && (
<ObserverThoughtScreenshot
observerThoughtId={selection.observer_thought_id}
/>
<ObserverThoughtScreenshot observerThoughtId={selection.thought_id} />
)}
</AspectRatio>
);

View File

@@ -119,11 +119,10 @@ function WorkflowRunTimeline({
if (isThoughtItem(timelineItem)) {
return (
<ThoughtCard
key={timelineItem.thought.observer_thought_id}
key={timelineItem.thought.thought_id}
active={
isObserverThought(activeItem) &&
activeItem.observer_thought_id ===
timelineItem.thought.observer_thought_id
activeItem.thought_id === timelineItem.thought.thought_id
}
onClick={onObserverThoughtCardSelected}
thought={timelineItem.thought}

View File

@@ -64,10 +64,7 @@ function findActiveItem(
) {
return current.block;
}
if (
current.type === "thought" &&
current.thought.observer_thought_id === target
) {
if (current.type === "thought" && current.thought.thought_id === target) {
return current.thought;
}
if (current.type === "block") {