Skip to content

Commit fa1c87f

Browse files
authored
feat(core): Add new Chat hub feature for chatting with LLMs and your n8n agent workflows (#23035)
1 parent 8ec8864 commit fa1c87f

File tree

5 files changed

+6
-17
lines changed

5 files changed

+6
-17
lines changed

packages/@n8n/backend-common/src/modules/__tests__/module-registry.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ beforeEach(() => {
1515

1616
describe('eligibleModules', () => {
1717
it('should consider all default modules eligible', () => {
18-
// 'chat-hub' isn't (yet) an eligible module by default
19-
const NON_DEFAULT_MODULES = ['chat-hub'];
20-
const expectedModules = MODULE_NAMES.filter((name) => !NON_DEFAULT_MODULES.includes(name));
21-
expect(Container.get(ModuleRegistry).eligibleModules).toEqual(expectedModules);
18+
expect(Container.get(ModuleRegistry).eligibleModules).toEqual(MODULE_NAMES);
2219
});
2320

2421
it('should consider a module ineligible if it was disabled via env var', () => {
@@ -31,6 +28,7 @@ describe('eligibleModules', () => {
3128
'provisioning',
3229
'breaking-changes',
3330
'dynamic-credentials',
31+
'chat-hub',
3432
]);
3533
});
3634

@@ -45,6 +43,7 @@ describe('eligibleModules', () => {
4543
'provisioning',
4644
'breaking-changes',
4745
'dynamic-credentials',
46+
'chat-hub',
4847
]);
4948
});
5049

packages/@n8n/backend-common/src/modules/module-registry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export class ModuleRegistry {
3838
'provisioning',
3939
'breaking-changes',
4040
'dynamic-credentials',
41+
'chat-hub',
4142
];
4243

4344
private readonly activeModules: string[] = [];

packages/@n8n/backend-common/src/modules/modules.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ export const MODULE_NAMES = [
88
'community-packages',
99
'data-table',
1010
'mcp',
11-
'chat-hub',
1211
'provisioning',
1312
'breaking-changes',
1413
'dynamic-credentials',
14+
'chat-hub',
1515
] as const;
1616

1717
export type ModuleName = (typeof MODULE_NAMES)[number];

packages/cli/src/modules/chat-hub/chat-hub.module.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
1-
import { Logger } from '@n8n/backend-common';
21
import type { ModuleInterface } from '@n8n/decorators';
32
import { BackendModule, OnShutdown } from '@n8n/decorators';
43
import { Container } from '@n8n/di';
54

6-
const YELLOW = '\x1b[33m';
7-
const CLEAR = '\x1b[0m';
8-
const WARNING_MESSAGE =
9-
"[Chat] 'chat-hub' module is experimental, undocumented and subject to change. " +
10-
'Before its official release any features may become inaccessible at any point, ' +
11-
'and using the module could compromise the stability of your system. Use at your own risk!';
12-
135
@BackendModule({ name: 'chat-hub' })
146
export class ChatHubModule implements ModuleInterface {
157
async init() {
16-
const logger = Container.get(Logger).scoped('chat-hub');
17-
logger.warn(`${YELLOW}${WARNING_MESSAGE}${CLEAR}`);
18-
198
await import('./chat-hub.controller');
209
await import('./chat-hub.settings.controller');
2110
}

packages/frontend/editor-ui/src/features/ai/chatHub/module.descriptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const SettingsChatHubView = async () =>
2222
export const ChatModule: FrontendModuleDescription = {
2323
id: 'chat-hub',
2424
name: 'Chat',
25-
description: 'Interact with various LLM models or your n8n AI agents.',
25+
description: 'Chat with LLM models or your n8n AI agents.',
2626
icon: 'chat',
2727
modals: [
2828
{

0 commit comments

Comments
 (0)