n8n/packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger
2025-06-13 10:16:18 +02:00
..
__test__ fix(Chat Trigger Node): Don't continue when action is load previous session and option is not set (#15438) 2025-05-19 16:21:23 +02:00
ChatTrigger.node.ts refactor(core): Refactor some imports to reduce baseline memory usage (#15916) 2025-06-03 11:23:44 +02:00
constants.ts feat(n8n Form Trigger Node, Chat Trigger Node): Allow to customize form and chat css (#13506) 2025-02-28 12:27:49 +01:00
error.ts fix: Prevent errors processed by n8n to be flagged as internal (no-changelog) (#10023) 2024-07-12 11:13:17 +03:00
GenericFunctions.ts refactor(core): Shovel around more of AI code (no-changelog) (#12218) 2024-12-16 13:46:19 +01:00
README.md feat(Chat Trigger Node): Fix CSS variable --chat--message--font-size not applying correctly (#16310) 2025-06-13 10:16:18 +02:00
templates.ts feat(n8n Form Trigger Node, Chat Trigger Node): Allow to customize form and chat css (#13506) 2025-02-28 12:27:49 +01:00
types.ts feat: Add Chat Trigger node (#7409) 2024-01-09 13:11:39 +02:00

ChatTrigger Local Development

This guide explains how to set up local development for the ChatTrigger node when working with the chat bundle.

Prerequisites

Since the chat bundle is loaded via <script type="module">, it needs to be served over HTTPS for local development.

Setup Instructions

1. Install HTTP Server

Install the http-server globally:

npm install -g http-server

2. Generate SSL Certificate

Generate a self-signed certificate for HTTPS:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

3. Build the Chat Bundle

Navigate to the chat package and build it:

cd packages/frontend/@n8n/chat && pnpm run build 

4. Start HTTPS Server

Run the HTTPS server to serve the chat bundle:

http-server packages/frontend/@n8n/chat/dist -g -S -C cert.pem -K key.pem --port 8443 --cors

5. Update Import Paths

Modify the import paths in templates.ts to point to your local server:

<script type="module">
    import { createChat } from 'https://127.0.0.1:8443/chat.bundle.es.js';
<link href="https://127.0.0.1:8443/chat.css" rel="stylesheet" />