В ДУХЕ1 collPrepPInvarsubj-compl with copula (subj: human) one is in a cheerful, happy mood
X был в духе =• X was in high (good, great) spirits
X was in a good (great) mood (frame of mind).
Я был в духе, импровизировал разные необыкновенные истории княжна сидела против меня и слушала мой вздор с таким глубоким, напряжённым, даже нежным вниманием, что мне стало совестно (Лермонтов 1). I was in high spirits, I improvised all kinds of extraordinary stories: the young princess sat opposite me and listened to my tosh with such deep, tense, even tender attention that I felt ashamed of myself (1a).