task v2 refactor part 9: ObserverTask -> TaskV2 in frontend code (#1822)

This commit is contained in:
Shuchang Zheng
2025-02-28 00:00:59 -05:00
committed by GitHub
parent 14689b53e4
commit 2849a3dc6c
5 changed files with 12 additions and 13 deletions

View File

@@ -21,7 +21,7 @@ function ObserverThoughtScreenshot({ observerThoughtId, taskStatus }: Props) {
queryFn: async () => {
const client = await getClient(credentialGetter);
return client
.get(`${apiPathPrefix}/observer_thought/${observerThoughtId}/artifacts`)
.get(`${apiPathPrefix}/thought/${observerThoughtId}/artifacts`)
.then((response) => response.data);
},
refetchInterval: (query) => {

View File

@@ -44,13 +44,13 @@ function WorkflowPostRunParameters() {
}
const activeBlock = getActiveBlock();
const isObserverTask = workflowRun.task_v2 !== null;
const isTaskV2 = workflowRun.task_v2 !== null;
const webhookCallbackUrl = isObserverTask
const webhookCallbackUrl = isTaskV2
? workflowRun.task_v2?.webhook_callback_url
: workflowRun.webhook_callback_url;
const proxyLocation = isObserverTask
const proxyLocation = isTaskV2
? workflowRun.task_v2?.proxy_location
: workflowRun.proxy_location;