mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor: Migrate NodeConnectionType to const object type (no-changelog) (#14078)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -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()) ?? [])
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user