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

@@ -2,7 +2,7 @@
import type { BaseChatMemory } from '@langchain/community/memory/chat_memory';
import type { BaseMessage } from '@langchain/core/messages';
import {
NodeConnectionType,
NodeConnectionTypes,
type IDataObject,
type IExecuteFunctions,
type INodeExecutionData,
@@ -61,16 +61,16 @@ export class MemoryChatRetriever implements INodeType {
},
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
inputs: [
NodeConnectionType.Main,
NodeConnectionTypes.Main,
{
displayName: 'Memory',
maxConnections: 1,
type: NodeConnectionType.AiMemory,
type: NodeConnectionTypes.AiMemory,
required: true,
},
],
// eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
outputs: [NodeConnectionType.Main],
outputs: [NodeConnectionTypes.Main],
properties: [
{
displayName: "This node is deprecated. Use 'Chat Memory Manager' node instead.",
@@ -91,7 +91,7 @@ export class MemoryChatRetriever implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
this.logger.debug('Executing Chat Memory Retriever');
const memory = (await this.getInputConnectionData(NodeConnectionType.AiMemory, 0)) as
const memory = (await this.getInputConnectionData(NodeConnectionTypes.AiMemory, 0)) as
| BaseChatMemory
| undefined;
const simplifyOutput = this.getNodeParameter('simplifyOutput', 0) as boolean;