fix(agents): TYPE_DEFAULTS.tools en string[] pour run-for-note
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m1s

Prisma attend une chaîne JSON pour Agent.tools ; on sérialise au create.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Antigravity
2026-05-05 22:01:12 +00:00
parent 3b72e4afbb
commit 33ad874e5d

View File

@@ -11,12 +11,12 @@ const TYPE_DEFAULTS: Record<GenerateType, {
}> = {
'slide-generator': {
role: 'Crée une présentation PowerPoint professionnelle et visuelle à partir du contenu de la note fournie.',
tools: JSON.stringify(['note_search', 'note_read', 'generate_pptx']),
tools: ['note_search', 'note_read', 'generate_pptx'],
maxSteps: 8,
},
'excalidraw-generator': {
role: 'Génère un diagramme Excalidraw clair et professionnel à partir du contenu de la note fournie.',
tools: JSON.stringify(['note_search', 'note_read', 'generate_excalidraw']),
tools: ['note_search', 'note_read', 'generate_excalidraw'],
maxSteps: 6,
},
}
@@ -59,7 +59,7 @@ export async function POST(req: NextRequest) {
name: agentName,
type,
role: defaults.role,
tools: defaults.tools,
tools: JSON.stringify(defaults.tools),
maxSteps: defaults.maxSteps,
frequency: 'one-shot',
isEnabled: true,