[AI] agent node prompt tab new design + refactor (#19012)

This commit is contained in:
nitin
2026-04-02 13:54:58 +05:30
committed by GitHub
parent 19c710b87f
commit ade6ed9c32
28 changed files with 786 additions and 475 deletions
@@ -0,0 +1,17 @@
import { type OutputSchemaField } from '@/ai/constants/OutputFieldTypeOptions';
import { type AgentResponseSchema } from 'twenty-shared/ai';
import { isDefined } from 'twenty-shared/utils';
import { v4 } from 'uuid';
export const schemaToFields = (
schema: AgentResponseSchema,
): OutputSchemaField[] => {
if (!isDefined(schema.properties)) return [];
return Object.entries(schema.properties).map(([key, field]) => ({
id: v4(),
name: key,
description: field.description || '',
type: field.type,
}));
};