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)
|
document.body.removeChild(mirror)
|
||||||
|
|
||||||
dropdownX.value = rect.left + mirrorRect.width - el.scrollLeft
|
dropdownX.value = rect.left + mirrorRect.width - el.scrollLeft
|
||||||
// Estimate Y based on newlines before @ and line height
|
dropdownY.value = rect.top - el.scrollTop - 8
|
||||||
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
|
|
||||||
|
|
||||||
mentionActive.value = filteredAgents.value.length > 0
|
mentionActive.value = filteredAgents.value.length > 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,12 +122,13 @@ const mentionNames = computed(() => props.agents.map(a => a.name).filter(Boolean
|
|||||||
color: $text-muted;
|
color: $text-muted;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.msg-time {
|
.msg-time {
|
||||||
font-size: 11px;
|
font-size: 12px;
|
||||||
color: $text-muted;
|
color: var(--text-muted);
|
||||||
margin-top: 2px;
|
opacity: 0.6;
|
||||||
}
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.msg-content {
|
.msg-content {
|
||||||
|
|||||||
@@ -139,6 +139,8 @@ export async function setConfigModel(ctx: any) {
|
|||||||
const config = await readConfigYaml()
|
const config = await readConfigYaml()
|
||||||
if (typeof config.model !== 'object' || config.model === null) { config.model = {} }
|
if (typeof config.model !== 'object' || config.model === null) { config.model = {} }
|
||||||
config.model.default = defaultModel
|
config.model.default = defaultModel
|
||||||
|
delete config.model.base_url
|
||||||
|
delete config.model.api_key
|
||||||
if (reqProvider) { config.model.provider = reqProvider }
|
if (reqProvider) { config.model.provider = reqProvider }
|
||||||
await writeConfigYaml(config)
|
await writeConfigYaml(config)
|
||||||
ctx.body = { success: true }
|
ctx.body = { success: true }
|
||||||
|
|||||||
Reference in New Issue
Block a user