fix: add type check for lastMessage.text in TTS useEffect (#10431)
fix: add type check for lastMessage.text before calling startsWith
Fixes #10430
The TTS useEffect was calling .startsWith() on lastMessage.text after only
checking if it was truthy. If text was a non-string truthy value (array,
object, or number), this would crash with "Q.text.startsWith is not a function".
Changed the truthy check to an explicit type check: typeof lastMessage.text === "string"
Co-authored-by: Roo Code <[email protected]>