Frege discusses the ideas (Vorstellungen) in Logical Investigations part I: Thoughts. Descartes discusses the ideas (the imagination) in Meditation VI. We have to find a similarity and a difference between these two with quotes from the texts. I simply can't find a difference between them.
For Frege, thought (Gedanke) is objective while idea (Vorstellung) is mental.
The thought is the "conceptual content" expressed by a sentence.
Ideas live in the so-called second realm of mental facts, while thoughts live in the third realm of timelessly truth.
According to Descartes’ Theory of Ideas, ideas are modes of the thinking substance, and thus they are in the mind.
Up to now, no differences. But the basic difference is that in Descartes' ontology there is no third world: concepts (and thoughts) are mental entities as well.
Compare with Locke's theory of ideas (quite similar to Descartes on this point) :
“words in their primary or immediate signification signify nothing but the ideas in the mind of him that uses them”.
This, in a nutshell, for Descartes ideas are the meaning of words/sentences, while for Frege they are not.