refactor(SessionItem): remove confirmation modal for delete action

Simplify delete flow by removing the confirmation modal and directly calling onDelete
This commit is contained in:
icarus 2025-09-19 15:59:18 +08:00
parent 7fc676bbc3
commit 00cc410dcc

View File

@ -57,13 +57,7 @@ const SessionItem: FC<SessionItemProps> = ({ session, agentId, onDelete, onPress
key="delete"
className="text-danger"
onClick={() => {
window.modal.confirm({
title: t('agent.session.delete.title'),
content: t('agent.session.delete.content'),
centered: true,
okButtonProps: { danger: true },
onOk: () => onDelete()
})
onDelete()
}}>
<DeleteIcon size={14} className="lucide-custom text-danger" />
<span className="text-danger">{t('common.delete')}</span>