Many of us first-gen owners have leaks because of rusted metal around the windshield. The trim around the windshield is purely cosmetic and catches and traps dirt and moisture and keeps it moist in there, promoting rust. Yours should be no different.
If you want quick but robust fix, Clean rusted area, paint, then patch leak with Sika urethane, the stuff they use to attach the windshield.
If you want a clean and robust solution, be prepared to have glass removed, do some rust repair, repaint and have glass re-installed. This is what I did on mine, and I did not have trim re-installed for above reason, like one thing that Jeep did better than Toyota.