I think the problem might not be as simple as "she just needs to vent" - sometimes a person is genuinely stuck in a negative thought pattern and can't get out on their own, it's not a lack of will. now, what nobody's mentioned so far is that you need to figure out first if this friend is actually depressed or dealing with anxiety. because then the whole dynamic changes completely - it's not just about boundaries or conversation techniques, it's about recognizing that she might need professional help, not your advice.
the risk I see in setting really rigid boundaries is you ending up seeming cold to her right when she's struggling. that can damage trust. what works better is being honest: sit down with her and say that you love your friendship, but you feel emotionally drained because she never leaves room for other conversations or for you two to just have fun together. then you lay it out: "look, I think you need someone professional to work through this, because a friend who complains 100% of the time is suffering, not just being annoying."
after that, you can definitely have boundaries, but without guilt and without being abrupt. like, when she starts with the same old story, you redirect: "hey, did you watch that series you wanted to?" or "want to go out and do something fun?". if she keeps pushing the drama, then you say you need to go and wrap up the conversation. the point is you're not abandoning your friend, you're just refusing to participate in the cycle - and making it clear to her that there are other ways for you two to relate.