fix: runAgent fire-and-forget + polling sur la page /agents
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
Le bouton Play des cartes agents appelait runAgent (Server Action) qui
attendait executeAgent (~2-5 min) → spinner bloqué sans résultat.
- runAgent retourne immédiatement { success, agentId }
- agent-card.tsx lance un polling toutes les 3s sur GET
/api/agents/run-for-note?agentId= jusqu'au statut terminal
- Toast persistant Sonner pendant la génération, mis à jour au résultat
- Cleanup automatique du polling au démontage
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1579,6 +1579,8 @@
|
||||
"updated": "Agent updated",
|
||||
"deleted": "\"{name}\" deleted",
|
||||
"deleteError": "Error deleting",
|
||||
"running": "Generation in progress…",
|
||||
"runningDesc": "Generation may take a few minutes. You can navigate freely.",
|
||||
"runSuccess": "\"{name}\" executed successfully",
|
||||
"runError": "Error: {error}",
|
||||
"runFailed": "Execution failed",
|
||||
|
||||
Reference in New Issue
Block a user