Stream of consciousness
The idea (but not the term) had been noted before James, by the philosopher William Hamilton in his lectures of 1838/9. He described thought as "a series of acts all... connected".