fix: Remove node AI Transform node (no-changelog) (#10400)

This commit is contained in:
Shireen Missi
2024-08-14 12:01:14 +01:00
committed by GitHub
parent c4fcbe40c5
commit bae0116d78
23 changed files with 38 additions and 831 deletions

View File

@@ -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();