mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
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:
committed by
GitHub
parent
4a89504d54
commit
117962d473
@@ -1098,6 +1098,7 @@ export interface ILoadOptions {
|
||||
|
||||
export interface INodePropertyTypeOptions {
|
||||
action?: string; // Supported by: button
|
||||
containerClass?: string; // Supported by: notice
|
||||
alwaysOpenEditWindow?: boolean; // Supported by: json
|
||||
codeAutocomplete?: CodeAutocompleteTypes; // Supported by: string
|
||||
editor?: EditorType; // Supported by: string
|
||||
@@ -1526,6 +1527,7 @@ export interface IPostReceiveSort extends IPostReceiveBase {
|
||||
}
|
||||
|
||||
export type ConnectionTypes =
|
||||
| 'ai_agent'
|
||||
| 'ai_chain'
|
||||
| 'ai_document'
|
||||
| 'ai_embedding'
|
||||
@@ -1540,6 +1542,8 @@ export type ConnectionTypes =
|
||||
| 'main';
|
||||
|
||||
export const enum NodeConnectionType {
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
AiAgent = 'ai_agent',
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
AiChain = 'ai_chain',
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
@@ -2376,3 +2380,4 @@ export type BannerName =
|
||||
| 'EMAIL_CONFIRMATION';
|
||||
|
||||
export type Severity = 'warning' | 'error';
|
||||
export type Functionality = 'regular' | 'configuration-node';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IDataObject, JsonObject, Severity } from '../../Interfaces';
|
||||
import type { Functionality, IDataObject, JsonObject, Severity } from '../../Interfaces';
|
||||
import { ApplicationError } from '../application.error';
|
||||
|
||||
interface ExecutionBaseErrorOptions {
|
||||
@@ -21,6 +21,8 @@ export abstract class ExecutionBaseError extends ApplicationError {
|
||||
|
||||
severity: Severity = 'error';
|
||||
|
||||
functionality: Functionality = 'regular';
|
||||
|
||||
constructor(message: string, { cause }: ExecutionBaseErrorOptions) {
|
||||
const options = cause instanceof Error ? { cause } : {};
|
||||
super(message, options);
|
||||
|
||||
@@ -4,7 +4,14 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
|
||||
import { parseString } from 'xml2js';
|
||||
import type { INode, JsonObject, IDataObject, IStatusCodeMessages, Severity } from '..';
|
||||
import type {
|
||||
INode,
|
||||
JsonObject,
|
||||
IDataObject,
|
||||
IStatusCodeMessages,
|
||||
Severity,
|
||||
Functionality,
|
||||
} from '../Interfaces';
|
||||
import { NodeError } from './abstract/node.error';
|
||||
import { removeCircularRefs } from '../utils';
|
||||
|
||||
@@ -15,6 +22,7 @@ export interface NodeOperationErrorOptions {
|
||||
itemIndex?: number;
|
||||
severity?: Severity;
|
||||
messageMapping?: { [key: string]: string }; // allows to pass custom mapping for error messages scoped to a node
|
||||
functionality?: Functionality;
|
||||
}
|
||||
|
||||
interface NodeApiErrorOptions extends NodeOperationErrorOptions {
|
||||
@@ -113,6 +121,7 @@ export class NodeApiError extends NodeError {
|
||||
runIndex,
|
||||
itemIndex,
|
||||
severity,
|
||||
functionality,
|
||||
messageMapping,
|
||||
}: NodeApiErrorOptions = {},
|
||||
) {
|
||||
@@ -206,6 +215,7 @@ export class NodeApiError extends NodeError {
|
||||
messageMapping,
|
||||
);
|
||||
|
||||
if (functionality !== undefined) this.context.functionality = functionality;
|
||||
if (runIndex !== undefined) this.context.runIndex = runIndex;
|
||||
if (itemIndex !== undefined) this.context.itemIndex = itemIndex;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export class NodeOperationError extends NodeError {
|
||||
|
||||
if (options.message) this.message = options.message;
|
||||
if (options.severity) this.severity = options.severity;
|
||||
if (options.functionality) this.functionality = options.functionality;
|
||||
this.description = options.description;
|
||||
this.context.runIndex = options.runIndex;
|
||||
this.context.itemIndex = options.itemIndex;
|
||||
|
||||
Reference in New Issue
Block a user