mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(editor): Fix error rendering and indexing of LLM sub-node outputs (#10688)
This commit is contained in:
@@ -56,6 +56,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { useNodeHelpers } from '@/composables/useNodeHelpers';
|
||||
import { useNodeType } from '@/composables/useNodeType';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { isEqual, isObject } from 'lodash-es';
|
||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
@@ -171,12 +172,16 @@ export default defineComponent({
|
||||
runIndex: props.runIndex,
|
||||
displayMode: ndvStore.getPanelDisplayMode(props.paneType),
|
||||
});
|
||||
const { isSubNodeType } = useNodeType({
|
||||
node,
|
||||
});
|
||||
|
||||
return {
|
||||
...useToast(),
|
||||
externalHooks,
|
||||
nodeHelpers,
|
||||
pinnedData,
|
||||
isSubNodeType,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
@@ -308,6 +313,12 @@ export default defineComponent({
|
||||
if (!this.node) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// If the node is a sub-node, we need to get the parent node error to check for input errors
|
||||
if (this.isSubNodeType && this.paneType === 'input') {
|
||||
const parentNode = this.workflow.getChildNodes(this.node?.name ?? '', 'ALL_NON_MAIN')[0];
|
||||
return this.workflowRunData?.[parentNode]?.[this.runIndex]?.error as NodeError;
|
||||
}
|
||||
return this.workflowRunData?.[this.node?.name]?.[this.runIndex]?.error as NodeError;
|
||||
},
|
||||
hasRunError(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user