fix(AgentItem): add missing onPress dependency to useCallback

Ensure the callback is updated when onPress prop changes to avoid stale closures
This commit is contained in:
icarus 2025-09-18 19:17:10 +08:00
parent d1819274bb
commit af6a3c87d6

View File

@ -31,7 +31,7 @@ const AgentItem: FC<AgentItemProps> = ({ agent, isActive, onDelete, onPress }) =
<span className="text-sm">{displayName}</span>
</Button>
)
}, [agent.id, agent.name, agent.type])
}, [agent.id, agent.name, agent.type, onPress])
const handleClick = () => logger.debug('not implemented')