From 33ad874e5d4bd96912600209c6e38a910d184d3c Mon Sep 17 00:00:00 2001 From: Antigravity Date: Tue, 5 May 2026 22:01:12 +0000 Subject: [PATCH] fix(agents): TYPE_DEFAULTS.tools en string[] pour run-for-note MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prisma attend une chaîne JSON pour Agent.tools ; on sérialise au create. Co-authored-by: Cursor --- memento-note/app/api/agents/run-for-note/route.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/memento-note/app/api/agents/run-for-note/route.ts b/memento-note/app/api/agents/run-for-note/route.ts index d8a7767..1272314 100644 --- a/memento-note/app/api/agents/run-for-note/route.ts +++ b/memento-note/app/api/agents/run-for-note/route.ts @@ -11,12 +11,12 @@ const TYPE_DEFAULTS: Record = { '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,