fix(editor): Disable fromAI button for vector stores (#13125)

This commit is contained in:
Charlie Kolb
2025-02-10 09:51:18 +01:00
committed by GitHub
parent 814e2a8924
commit bde84205f9
2 changed files with 20 additions and 1 deletions

View File

@@ -48,6 +48,8 @@ const NODE_DENYLIST = ['toolCode', 'toolHttpRequest'];
const PATH_DENYLIST = [
'parameters.name',
// this is used in vector store tools
'parameters.toolName',
'parameters.description',
// This is used in e.g. the telegram node if the dropdown selects manual mode
'parameters.toolDescription',
@@ -164,7 +166,11 @@ export function canBeContentOverride(
if (PATH_DENYLIST.includes(props.path)) return false;
const codex = nodeType?.codex;
if (!codex?.categories?.includes('AI') || !codex?.subcategories?.AI?.includes('Tools'))
if (
!codex?.categories?.includes('AI') ||
!codex?.subcategories?.AI?.includes('Tools') ||
codex?.subcategories?.AI?.includes('Vector Stores') // vector stores do not support fromAI
)
return false;
return !props.parameter.noDataExpression && 'options' !== props.parameter.type;