fix(editor): Fix rendering of AI logs (#11450)

This commit is contained in:
oleg
2024-10-31 14:20:04 +01:00
committed by GitHub
parent 5d19e8f2b4
commit 73b0a80ac9
6 changed files with 97 additions and 83 deletions

View File

@@ -100,14 +100,15 @@ const isTriggerNode = computed(() => {
});
const hasAiMetadata = computed(() => {
if (isNodeRunning.value || !workflowRunData.value) {
return false;
}
if (node.value) {
const resultData = workflowsStore.getWorkflowResultDataByNodeName(node.value.name);
const connectedSubNodes = props.workflow.getParentNodes(node.value.name, 'ALL_NON_MAIN');
const resultData = connectedSubNodes.map(workflowsStore.getWorkflowResultDataByNodeName);
if (!resultData || !Array.isArray(resultData) || resultData.length === 0) {
return false;
}
return !!resultData[resultData.length - 1].metadata;
return resultData && Array.isArray(resultData) && resultData.length > 0;
}
return false;
});
@@ -295,6 +296,7 @@ const activatePane = () => {
:block-u-i="blockUI"
:is-production-execution-preview="isProductionExecutionPreview"
:is-pane-active="isPaneActive"
:hide-pagination="outputMode === 'logs'"
pane-type="output"
:data-output-type="outputMode"
@activate-pane="activatePane"
@@ -368,7 +370,7 @@ const activatePane = () => {
</template>
<template v-if="outputMode === 'logs' && node" #content>
<RunDataAi :node="node" :run-index="runIndex" />
<RunDataAi :node="node" :run-index="runIndex" :workflow="workflow" />
</template>
<template #recovered-artificial-output-data>