Add ChatRepository interface and implementation