If Kaley Cuoco has seemed unusually upbeat after her split from husband Ryan Sweeting, it might be because she saw the breakup coming.
A source close to Sweeting tells ET, "Kaley ended things with Ryan. It didn't come out of left field or a shock to anyone close to them ... it was a long time coming."
WATCH: Kaley Cuoco Divorcing Ryan Sweeting After 21 Months of Marriage
Cuoco's rep confirmed the split to ET on Sept. 25. Just hours later, the Big Bang Theory star was seen hanging out with five gal-pals, including her sister, Briana, at a restaurant in Studio City, California. According to an eyewitness, the ladies were heard laughing and animatedly talking about Sweeting.
This came after the 29-year-old actress took to Instagram in April to shut down then-rumors that she and Sweeting, 28, were divorcing. Those posts have since been deleted.
"She realized she wants to be with a guy who has a job and is motivated," our source says. "All of Ryan's friends knew it was going to end bad."
Sweeting, a tennis player, turned pro in 2007. His first and only title came in 2011, when he beat Kei Nishikori of Japan at the U.S. Men's Clay Court Championships in Houston.
According to court documents obtained by ET, the couple signed a prenuptial agreement prior to their wedding on Dec. 31, 2013.
WATCH: 12 Times Kaley Cuoco Gushed About Ryan Sweeting
Cuoco and Sweeting, who dated for three months, were married for 21 months. They were last seen in public together on Aug. 22 at the LG "Fam To Table" series at The Washbow in Culver City, California, where they stood arm-in-arm while taking photos on the event's red carpet.