In Sonic XEdit
When Cosmo arrived on Earth, Tails and Cosmo became friends. When they were left on a mission alone, Tails got hurt and Cosmo cared for his wound which Tails blushed in return. Throughout the series, their relationship began to grow stronger Tails even tried to tell her she was beautiful but didn't have the courage to complete his sentence so Cosmo mistook it for something else.
Later on, Tails protected Cosmo from Shadow after he tried to assassinate her. To defeat the metarex and Dark oak, Cosmo decided to sacrifice herself much to Tails dismay. After Dr. Eggman reassures Tails, he fires the cannon with the Sonic Driver while saying "I love you Cosmo!" Cosmo says "I'll never forget you Tails."