While Tesla shares have pared gains, optimism is building for the company’s efforts in AI and autonomous driving.