fix(agents): TYPE_DEFAULTS.tools en string[] pour run-for-note
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m1s
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:
@@ -11,12 +11,12 @@ const TYPE_DEFAULTS: Record<GenerateType, {
|
|||||||
}> = {
|
}> = {
|
||||||
'slide-generator': {
|
'slide-generator': {
|
||||||
role: 'Crée une présentation PowerPoint professionnelle et visuelle à partir du contenu de la note fournie.',
|
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,
|
maxSteps: 8,
|
||||||
},
|
},
|
||||||
'excalidraw-generator': {
|
'excalidraw-generator': {
|
||||||
role: 'Génère un diagramme Excalidraw clair et professionnel à partir du contenu de la note fournie.',
|
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,
|
maxSteps: 6,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@ export async function POST(req: NextRequest) {
|
|||||||
name: agentName,
|
name: agentName,
|
||||||
type,
|
type,
|
||||||
role: defaults.role,
|
role: defaults.role,
|
||||||
tools: defaults.tools,
|
tools: JSON.stringify(defaults.tools),
|
||||||
maxSteps: defaults.maxSteps,
|
maxSteps: defaults.maxSteps,
|
||||||
frequency: 'one-shot',
|
frequency: 'one-shot',
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user