refactor: Migrate NodeConnectionType to const object type (no-changelog) (#14078)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Alex Grozav
2025-03-21 14:01:26 +02:00
committed by GitHub
parent 7e8179b848
commit 8215e0b59f
703 changed files with 3104 additions and 3018 deletions

View File

@@ -1,6 +1,6 @@
import type { BaseChatMemory } from '@langchain/community/memory/chat_memory';
import { pick } from 'lodash';
import { Node, NodeConnectionType } from 'n8n-workflow';
import { Node, NodeConnectionTypes } from 'n8n-workflow';
import type {
IDataObject,
IWebhookFunctions,
@@ -70,12 +70,12 @@ export class ChatTrigger extends Node {
{
displayName: 'Memory',
maxConnections: 1,
type: '${NodeConnectionType.AiMemory}',
type: '${NodeConnectionTypes.AiMemory}',
required: true,
}
];
})() }}`,
outputs: [NodeConnectionType.Main],
outputs: [NodeConnectionTypes.Main],
credentials: [
{
// eslint-disable-next-line n8n-nodes-base/node-class-description-credentials-name-unsuffixed
@@ -554,7 +554,7 @@ ${cssVariables}
if (bodyData.action === 'loadPreviousSession') {
if (options?.loadPreviousSession === 'memory') {
const memory = (await ctx.getInputConnectionData(NodeConnectionType.AiMemory, 0)) as
const memory = (await ctx.getInputConnectionData(NodeConnectionTypes.AiMemory, 0)) as
| BaseChatMemory
| undefined;
const messages = ((await memory?.chatHistory.getMessages()) ?? [])

View File

@@ -3,7 +3,7 @@ import {
type INodeType,
type INodeTypeDescription,
type ITriggerResponse,
NodeConnectionType,
NodeConnectionTypes,
} from 'n8n-workflow';
export class ManualChatTrigger implements INodeType {
@@ -35,7 +35,7 @@ export class ManualChatTrigger implements INodeType {
},
},
inputs: [],
outputs: [NodeConnectionType.Main],
outputs: [NodeConnectionTypes.Main],
properties: [
{
displayName: