llHeight <= parent.scrollTop + parent.offsetHeight + 300) {
          parent.scrollTo(0, parent.scrollHeight)
        }
      }, [messages])

      const ttsChatLineActiveIx = useSignal(undefined);
      const ttsChatLine = (e, ix, msg) => {
        if (e) e.preventDefault();

        if (!tts || !ttsVoice.value || !('SpeechSynthesisUtterance' in window)) return;

        const ttsVoices = tts.getVoices();
        const voice = ttsVoices.find(v => v.name === ttsVoice.value);
        if (!voice)