task v2 refactor part 7: observer_task -> task_v2 frontend code (#1821)
This commit is contained in:
@@ -244,7 +244,7 @@ export type WorkflowRunStatusApiResponse = {
|
||||
downloaded_file_urls: Array<string> | null;
|
||||
total_steps: number | null;
|
||||
total_cost: number | null;
|
||||
observer_task: ObserverTask | null;
|
||||
task_v2: ObserverTask | null;
|
||||
workflow_title: string | null;
|
||||
};
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ function WorkflowRun() {
|
||||
});
|
||||
}
|
||||
|
||||
const isTaskv2Run = workflowRun && workflowRun.observer_task !== null;
|
||||
const isTaskv2Run = workflowRun && workflowRun.task_v2 !== null;
|
||||
|
||||
return (
|
||||
<div className="space-y-8">
|
||||
|
||||
@@ -44,14 +44,14 @@ function WorkflowPostRunParameters() {
|
||||
}
|
||||
|
||||
const activeBlock = getActiveBlock();
|
||||
const isObserverTask = workflowRun.observer_task !== null;
|
||||
const isObserverTask = workflowRun.task_v2 !== null;
|
||||
|
||||
const webhookCallbackUrl = isObserverTask
|
||||
? workflowRun.observer_task?.webhook_callback_url
|
||||
? workflowRun.task_v2?.webhook_callback_url
|
||||
: workflowRun.webhook_callback_url;
|
||||
|
||||
const proxyLocation = isObserverTask
|
||||
? workflowRun.observer_task?.proxy_location
|
||||
? workflowRun.task_v2?.proxy_location
|
||||
: workflowRun.proxy_location;
|
||||
|
||||
return (
|
||||
@@ -149,7 +149,7 @@ function WorkflowPostRunParameters() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{workflowRun.observer_task ? (
|
||||
{workflowRun.task_v2 ? (
|
||||
<div className="rounded bg-slate-elevation2 p-6">
|
||||
<div className="space-y-4">
|
||||
<h1 className="text-lg font-bold">Task 2.0 Parameters</h1>
|
||||
@@ -161,7 +161,7 @@ function WorkflowPostRunParameters() {
|
||||
</h2>
|
||||
</div>
|
||||
<AutoResizingTextarea
|
||||
value={workflowRun.observer_task.prompt ?? ""}
|
||||
value={workflowRun.task_v2.prompt ?? ""}
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -77,7 +77,7 @@ function WorkflowRunOutput() {
|
||||
? formatExtractedInformation(outputs)
|
||||
: outputs;
|
||||
const fileUrls = workflowRun?.downloaded_file_urls ?? [];
|
||||
const observerOutput = workflowRun?.observer_task?.output;
|
||||
const observerOutput = workflowRun?.task_v2?.output;
|
||||
|
||||
return (
|
||||
<div className="space-y-5">
|
||||
|
||||
Reference in New Issue
Block a user