mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-19 07:36:52 +00:00
feat(editor): Hide AI Transform node when Instance AI is enabled (no-changelog)
The Instance AI assistant supersedes the legacy AI Transform node as the AI code-generation surface. When the instance-ai module is active, filter the node out of the creator/search so users aren't offered both. Existing aiTransform nodes on a canvas still resolve and run.
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
HTTP_REQUEST_NODE_TYPE,
|
||||
CREDENTIAL_ONLY_HTTP_NODE_VERSION,
|
||||
MODULE_ENABLED_NODES,
|
||||
AI_TRANSFORM_NODE_TYPE,
|
||||
} from '@/app/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import type { NodeTypesByTypeNameAndVersion } from '@/Interface';
|
||||
@@ -220,10 +221,18 @@ export const useNodeTypesStore = defineStore(STORES.NODE_TYPES, () => {
|
||||
});
|
||||
|
||||
const visibleNodeTypes = computed(() => {
|
||||
// Instance AI replaces the legacy "AI Transform" node; hide it from the
|
||||
// creator/search when the instance has Instance AI on.
|
||||
const instanceAiActive =
|
||||
settingsStore.isModuleActive('instance-ai') &&
|
||||
settingsStore.moduleSettings['instance-ai']?.enabled !== false;
|
||||
return allLatestNodeTypes.value
|
||||
.concat(officialCommunityNodeTypes.value)
|
||||
.concat(moduleEnabledNodeTypes.value)
|
||||
.filter((nodeType) => !nodeType.hidden);
|
||||
.filter(
|
||||
(nodeType) =>
|
||||
!nodeType.hidden && !(instanceAiActive && nodeType.name === AI_TRANSFORM_NODE_TYPE),
|
||||
);
|
||||
});
|
||||
|
||||
const nativelyNumberSuffixedDefaults = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user