fix(agents): badge "Nouveau" disparaît après modification de l'agent

Compare createdAt et updatedAt au lieu du seuil de 24h.
Prisma met à jour updatedAt automatiquement à chaque édition.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Sepehr Ramezani
2026-04-19 15:13:43 +02:00
parent 5c63dfdd0c
commit 5296c4da2c

View File

@@ -89,7 +89,7 @@ export function AgentCard({ agent, onEdit, onRefresh, onToggle }: AgentCardProps
const Icon = config.icon
const lastAction = agent.actions[0]
const dateLocale = language === 'fr' ? fr : enUS
const isNew = Date.now() - new Date(agent.createdAt).getTime() < 24 * 60 * 60 * 1000
const isNew = new Date(agent.createdAt).getTime() === new Date(agent.updatedAt).getTime()
const handleRun = async () => {
setIsRunning(true)