The major stock indexes were in the green Tuesday afternoon after swinging between gains and losses throughout a volatile morning as concerns about AI disruption continued to rattle tech investors.