diff --git a/routes/session_routes.py b/routes/session_routes.py index 7642bb7e3..8214c57dc 100644 --- a/routes/session_routes.py +++ b/routes/session_routes.py @@ -362,7 +362,7 @@ def _set_group_participant_folders(db, participant_ids: set[str], folder: str | return q = db.query(DbSession).filter(DbSession.id.in_(participant_ids)) q = owner_filter(q, DbSession, user) - now = datetime.utcnow() + now = utcnow_naive() for participant in q.all(): participant.folder = folder participant.updated_at = now diff --git a/static/js/group.js b/static/js/group.js index 2f2b98476..a3de2d540 100644 --- a/static/js/group.js +++ b/static/js/group.js @@ -816,10 +816,10 @@ function _createGroupBubble(model, box, options = {}) { wrap.style.position = 'relative'; // Role label — use character name if assigned, otherwise model name - const roleLabel = model._groupName || (model.character ? model.character.characterName : chatRenderer.shortModel(model.mid)); + const participantLabel = model._groupName || (model.character ? model.character.characterName : chatRenderer.shortModel(model.mid)); const roleTs = new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); - const displayLabel = options.whisper ? `Whisper from ${roleLabel}` : roleLabel; - wrap.innerHTML = `
${uiModule.esc(displayLabel)} ${roleTs}
`; + const roleLabel = options.whisper ? `Whisper from ${participantLabel}` : participantLabel; + wrap.innerHTML = `
${uiModule.esc(roleLabel)} ${roleTs}
`; chatRenderer.applyModelColor(wrap.querySelector('.role'), model.mid); // Spinner — identical to chat.js line 3062 diff --git a/static/js/sessions.js b/static/js/sessions.js index 84232a5d3..651b15124 100644 --- a/static/js/sessions.js +++ b/static/js/sessions.js @@ -2214,13 +2214,12 @@ export async function selectSession(id, { keepSidebar = false, showLoading = tru for (const msg of msgHistory) { let renderMsg = msg; if (groupChildInfo && msg.role === 'assistant') { + const childMeta = { ...(msg.metadata || {}) }; + childMeta.character_name = childMeta.character_name || groupChildInfo.name; + if (!childMeta.model && groupChildInfo.model) childMeta.model = groupChildInfo.model; renderMsg = { ...msg, - metadata: { - ...(msg.metadata || {}), - character_name: (msg.metadata && msg.metadata.character_name) || groupChildInfo.name, - model: (msg.metadata && msg.metadata.model) || groupChildInfo.model || '', - }, + metadata: childMeta, }; } try {