mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
fix: Remove node AI Transform node (no-changelog) (#10400)
This commit is contained in:
@@ -9,7 +9,6 @@ import type {
|
||||
import {
|
||||
AI_CATEGORY_AGENTS,
|
||||
AI_SUBCATEGORY,
|
||||
AI_TRANSFORM_NODE_TYPE,
|
||||
CORE_NODES_CATEGORY,
|
||||
DEFAULT_SUBCATEGORY,
|
||||
} from '@/constants';
|
||||
@@ -20,8 +19,6 @@ import type { NodeViewItemSection } from './viewsData';
|
||||
import { i18n } from '@/plugins/i18n';
|
||||
import { sortBy } from 'lodash-es';
|
||||
|
||||
import { usePostHog } from '@/stores/posthog.store';
|
||||
|
||||
export function transformNodeType(
|
||||
node: SimplifiedNodeType,
|
||||
subcategory?: string,
|
||||
@@ -77,11 +74,6 @@ export function sortNodeCreateElements(nodes: INodeCreateElement[]) {
|
||||
}
|
||||
|
||||
export function searchNodes(searchFilter: string, items: INodeCreateElement[]) {
|
||||
const aiEnabled = usePostHog().isAiEnabled();
|
||||
if (!aiEnabled) {
|
||||
items = items.filter((item) => item.key !== AI_TRANSFORM_NODE_TYPE);
|
||||
}
|
||||
|
||||
// In order to support the old search we need to remove the 'trigger' part
|
||||
const trimmedFilter = searchFilter.toLowerCase().replace('trigger', '').trimEnd();
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
AI_TRANSFORM_NODE_TYPE,
|
||||
CORE_NODES_CATEGORY,
|
||||
WEBHOOK_NODE_TYPE,
|
||||
OTHER_TRIGGER_NODES_SUBCATEGORY,
|
||||
@@ -64,7 +63,6 @@ import { NodeConnectionType } from 'n8n-workflow';
|
||||
import { useTemplatesStore } from '@/stores/templates.store';
|
||||
import type { BaseTextKey } from '@/plugins/i18n';
|
||||
import { camelCase } from 'lodash-es';
|
||||
import { usePostHog } from '@/stores/posthog.store';
|
||||
|
||||
export interface NodeViewItemSection {
|
||||
key: string;
|
||||
@@ -431,13 +429,6 @@ export function TriggerView() {
|
||||
export function RegularView(nodes: SimplifiedNodeType[]) {
|
||||
const i18n = useI18n();
|
||||
|
||||
const popularItemsSubcategory = [SET_NODE_TYPE, CODE_NODE_TYPE, DATETIME_NODE_TYPE];
|
||||
const aiEnabled = usePostHog().isAiEnabled();
|
||||
|
||||
if (aiEnabled) {
|
||||
popularItemsSubcategory.push(AI_TRANSFORM_NODE_TYPE);
|
||||
}
|
||||
|
||||
const view: NodeView = {
|
||||
value: REGULAR_NODE_CREATOR_VIEW,
|
||||
title: i18n.baseText('nodeCreator.triggerHelperPanel.whatHappensNext'),
|
||||
@@ -462,7 +453,7 @@ export function RegularView(nodes: SimplifiedNodeType[]) {
|
||||
{
|
||||
key: 'popular',
|
||||
title: i18n.baseText('nodeCreator.sectionNames.popular'),
|
||||
items: popularItemsSubcategory,
|
||||
items: [SET_NODE_TYPE, CODE_NODE_TYPE, DATETIME_NODE_TYPE],
|
||||
},
|
||||
{
|
||||
key: 'addOrRemove',
|
||||
|
||||
Reference in New Issue
Block a user