diff --git a/templates/index.html b/templates/index.html index cc5a658..8641a09 100644 --- a/templates/index.html +++ b/templates/index.html @@ -454,6 +454,8 @@ let skillsEnabled = true; let presets = []; let skillsRegistry = []; let currentModel = ''; +const MODEL_LABELS = { 'qwen2.5-7b-instruct': 'qwen2.5:7B:i' }; +function modelLabel() { return MODEL_LABELS[currentModel] || currentModel || 'assistant'; } let modelContextSize = 8192; let cachedProfile = ''; let conversationHistory = []; @@ -1448,7 +1450,7 @@ function appendMessage(role, content, animate, isSearch = false, afterEl = null) const timeStr = months[now.getMonth()] + ' ' + String(now.getDate()).padStart(2,'0') + ', ' + now.getFullYear() + ' ' + String(now.getHours()).padStart(2,'0') + ':' + String(now.getMinutes()).padStart(2,'0') + ':' + String(now.getSeconds()).padStart(2,'0') + '.' + String(Math.floor(ms / 10)).padStart(2,'0'); const textHtml = content ? renderMarkdown(content) : ''; const copyIcon = role === 'user' && content ? `📋` : ''; - div.innerHTML = `
${role === 'user' ? 'YOU' : 'AI'}
${role}${role === 'user' ? ' ' + timeStr + '' : ''}
${textHtml}${copyIcon}
${role === 'assistant' ? '
' : ''}
`; + div.innerHTML = `
${role === 'user' ? 'YOU' : 'AI'}
${role === 'assistant' ? modelLabel() : role}${role === 'user' ? ' ' + timeStr + '' : ''}
${textHtml}${copyIcon}
${role === 'assistant' ? '
' : ''}
`; if (role === 'user') { const pair = document.createElement('div'); pair.className = 'msg-pair' + (isSearch ? ' search-pair' : '');