mirror of
https://github.com/EKKOLearnAI/hermes-web-ui.git
synced 2026-05-25 21:40:13 +00:00
fix: group chat UX polish and model switch cleanup (#205)
* fix(chat): clamp context remaining tokens to 0 instead of showing negative Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: group chat mention popup position, timestamp style, and model switch cleanup - Move @ mention popup above input to avoid blocking the textarea - Fix .msg-time scoping (was nested inside .msg-header, now top-level) - Reduce timestamp opacity and set to 12px for subtler display - Clean up stale base_url/api_key from config.yaml on model switch Closes #204 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: remove unused variables in GroupChatInput Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -90,10 +90,7 @@ function updateMentionState() {
|
||||
document.body.removeChild(mirror)
|
||||
|
||||
dropdownX.value = rect.left + mirrorRect.width - el.scrollLeft
|
||||
// Estimate Y based on newlines before @ and line height
|
||||
const linesBeforeAt = text.slice(0, atPos + 1).split('\n').length - 1
|
||||
const lineHeight = parseFloat(style.lineHeight) || parseFloat(style.fontSize) * 1.2
|
||||
dropdownY.value = rect.top + linesBeforeAt * lineHeight - el.scrollTop + lineHeight + 4
|
||||
dropdownY.value = rect.top - el.scrollTop - 8
|
||||
|
||||
mentionActive.value = filteredAgents.value.length > 0
|
||||
}
|
||||
|
||||
@@ -122,12 +122,13 @@ const mentionNames = computed(() => props.agents.map(a => a.name).filter(Boolean
|
||||
color: $text-muted;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
.msg-time {
|
||||
font-size: 11px;
|
||||
color: $text-muted;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.msg-time {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
opacity: 0.6;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.msg-content {
|
||||
|
||||
@@ -139,6 +139,8 @@ export async function setConfigModel(ctx: any) {
|
||||
const config = await readConfigYaml()
|
||||
if (typeof config.model !== 'object' || config.model === null) { config.model = {} }
|
||||
config.model.default = defaultModel
|
||||
delete config.model.base_url
|
||||
delete config.model.api_key
|
||||
if (reqProvider) { config.model.provider = reqProvider }
|
||||
await writeConfigYaml(config)
|
||||
ctx.body = { success: true }
|
||||
|
||||
Reference in New Issue
Block a user