          toggleButton.addEventListener('click', function() {
                    if (thought.style.display === 'none') {
                        thought.style.display = 'block';
                    } else {
                        thought.style.display = 'none';
                    }
                });

                g_md_src = "";
                g_thought_src = "";
                is_thinking = false;
                g_thought_start_time = 0;
            }

            function append_user_input(input