mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-08-05 02:45:28 +00:00
fix(group): align recovered branch with current tests
This commit is contained in:
parent
bef1cbfd54
commit
811b4b3e1f
3 changed files with 8 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = `<div class="role">${uiModule.esc(displayLabel)} <span class="role-timestamp">${roleTs}</span></div><div class="body"></div>`;
|
||||
const roleLabel = options.whisper ? `Whisper from ${participantLabel}` : participantLabel;
|
||||
wrap.innerHTML = `<div class="role">${uiModule.esc(roleLabel)} <span class="role-timestamp">${roleTs}</span></div><div class="body"></div>`;
|
||||
chatRenderer.applyModelColor(wrap.querySelector('.role'), model.mid);
|
||||
|
||||
// Spinner — identical to chat.js line 3062
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue