feat: Enable code capture in ai transform node (no-changelog) (#11241)

This commit is contained in:
Michael Kret
2024-10-14 16:53:16 +03:00
committed by GitHub
parent b028d81390
commit 4bd4b6977a
2 changed files with 16 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ import { hasExpressionMapping, isValueExpression } from '@/utils/nodeTypesUtils'
import { isResourceLocatorValue } from '@/utils/typeGuards';
import {
AI_TRANSFORM_NODE_TYPE,
APP_MODALS_ELEMENT_ID,
CORE_NODES_CATEGORY,
CUSTOM_API_CALL_KEY,
@@ -541,6 +542,13 @@ const showDragnDropTip = computed(
ndvStore.isInputParentOfActiveNode,
);
const shouldCaptureForPosthog = computed(() => {
if (node.value?.type) {
return [AI_TRANSFORM_NODE_TYPE].includes(node.value?.type);
}
return false;
});
function isRemoteParameterOption(option: INodePropertyOptions) {
return remoteParameterOptionsKeys.value.includes(option.name);
}
@@ -1124,6 +1132,7 @@ onUpdated(async () => {
:model-value="modelValueString"
:is-read-only="isReadOnly"
:rows="editorRows"
:posthog-capture="shouldCaptureForPosthog"
fill-parent
@update:model-value="valueChangedDebounced"
/>
@@ -1223,6 +1232,7 @@ onUpdated(async () => {
:model-value="modelValueString"
:is-read-only="isReadOnly || editorIsReadOnly"
:rows="editorRows"
:posthog-capture="shouldCaptureForPosthog"
@update:model-value="valueChangedDebounced"
>
<template #suffix>