fix ask-AI

This commit is contained in:
2025-06-14 18:51:22 +09:00
parent 3b2c53fc97
commit b7f62e729a
7 changed files with 25 additions and 18 deletions

View File

@ -186,12 +186,7 @@ function updateAskAIButton() {
const button = document.getElementById('askAiButton');
if (!button) return;
const iconSpan = button.querySelector('.ai-icon');
if (aiProfileData && aiProfileData.avatar && iconSpan) {
iconSpan.innerHTML = `<img src="${aiProfileData.avatar}" alt="${aiProfileData.displayName || 'AI'}" class="ai-avatar-small">`;
}
// Only update text, never modify the icon
if (aiProfileData && aiProfileData.displayName) {
const textNode = button.childNodes[2] || button.lastChild;
if (textNode && textNode.nodeType === Node.TEXT_NODE) {