feat(core): Update LLM applications building support (no-changelog) (#7710)

extracted out of #7336

---------

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-11-28 16:47:28 +01:00
committed by GitHub
parent 4a89504d54
commit 117962d473
58 changed files with 1135 additions and 183 deletions

View File

@@ -169,6 +169,7 @@ import type {
INodeOutputConfiguration,
INodeTypeDescription,
ITaskData,
NodeOperationError,
} from 'n8n-workflow';
import { NodeConnectionType, NodeHelpers } from 'n8n-workflow';
@@ -392,7 +393,7 @@ export default defineComponent({
nodeExecutionStatus(): string {
const nodeExecutionRunData = this.workflowsStore.getWorkflowRunData?.[this.name];
if (nodeExecutionRunData) {
return nodeExecutionRunData[0].executionStatus ?? '';
return nodeExecutionRunData.filter(Boolean)[0].executionStatus ?? '';
}
return '';
},
@@ -401,7 +402,7 @@ export default defineComponent({
const nodeExecutionRunData = this.workflowsStore.getWorkflowRunData?.[this.name];
if (nodeExecutionRunData) {
nodeExecutionRunData.forEach((executionRunData) => {
if (executionRunData.error) {
if (executionRunData?.error) {
issues.push(
`${executionRunData.error.message}${
executionRunData.error.description ? ` (${executionRunData.error.description})` : ''
@@ -426,7 +427,10 @@ export default defineComponent({
return this.node ? this.node.position : [0, 0];
},
showDisabledLinethrough(): boolean {
return !!(this.data.disabled && this.inputs.length === 1 && this.outputs.length === 1);
return (
!this.isConfigurableNode &&
!!(this.data.disabled && this.inputs.length === 1 && this.outputs.length === 1)
);
},
shortNodeType(): string {
return this.$locale.shortNodeType(this.data.type);
@@ -482,9 +486,15 @@ export default defineComponent({
borderColor = '--color-foreground-base';
} else if (!this.isExecuting) {
if (this.hasIssues) {
borderColor = '--color-danger';
returnStyles['border-width'] = '2px';
returnStyles['border-style'] = 'solid';
// Do not set red border if there is an issue with the configuration node
if (
(this.nodeRunData?.[0]?.error as NodeOperationError)?.functionality !==
'configuration-node'
) {
borderColor = '--color-danger';
returnStyles['border-width'] = '2px';
returnStyles['border-style'] = 'solid';
}
} else if (this.waiting || this.showPinnedDataInfo) {
borderColor = '--color-canvas-node-pinned-border';
} else if (this.nodeExecutionStatus === 'unknown') {
@@ -608,6 +618,7 @@ export default defineComponent({
!this.isTriggerNode ||
this.isManualTypeNode ||
this.isScheduledGroup ||
this.uiStore.isModalActive ||
dataItemsCount === 0
)
return;
@@ -1333,6 +1344,10 @@ export default defineComponent({
z-index: 10;
}
&.add-input-endpoint-error {
--endpoint-svg-color: var(--color-danger);
}
.add-input-endpoint-default {
transition: transform var(--add-input-endpoint--transition-duration) ease;
}