mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 17:55:26 -04:00
Revert Chat/Agent mode tag in message header
Per user report — the tag's mode metadata coincided with a 500 error on agent mode (especially on mobile). Removing the UI tag, the chat.js writes of metadata.mode, and the CSS pill so agent mode posts work cleanly again. Touches: - chat.js: drop _sendMode capture + meta.mode writes (user + assistant) - chatRenderer.js: roleTimestamp() back to a single (when) arg, drop the .role-mode-tag append; updated three call sites - style.css: dropped .role-mode-tag and .role-mode-agent rules
This commit is contained in:
+1
-18
@@ -628,18 +628,8 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
|
||||
}
|
||||
}
|
||||
let _userMsgEl = null;
|
||||
// Capture which mode the user picked at send time so the message
|
||||
// header can show "Chat" or "Agent" next to the timestamp.
|
||||
// toggleState is declared later in this function — load fresh here.
|
||||
let _sendMode = 'chat';
|
||||
try {
|
||||
const _ts = Storage.loadToggleState();
|
||||
if ((_ts.mode || 'chat') === 'agent') _sendMode = 'agent';
|
||||
} catch (_) {}
|
||||
if (!skipBubble) {
|
||||
const _userMeta = { mode: _sendMode };
|
||||
if (_pendingAttachInfo) _userMeta.attachments = _pendingAttachInfo;
|
||||
_userMsgEl = addMessage('user', userDisplay, null, _userMeta);
|
||||
_userMsgEl = addMessage('user', userDisplay, null, _pendingAttachInfo ? { attachments: _pendingAttachInfo } : null);
|
||||
}
|
||||
messageInput.value = '';
|
||||
messageInput.style.height = '';
|
||||
@@ -3433,13 +3423,6 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
|
||||
if (holder.parentNode) holder.remove();
|
||||
const model = meta && meta.model;
|
||||
const meta_ = metricsData ? Object.assign({ model }, metricsData) : { model };
|
||||
// Carry the send-time mode through so the assistant header gets
|
||||
// the same Chat/Agent tag next to its timestamp. toggleState
|
||||
// isn't in scope here — read fresh.
|
||||
try {
|
||||
const _ts = Storage.loadToggleState();
|
||||
meta_.mode = ((_ts.mode || 'chat') === 'agent') ? 'agent' : 'chat';
|
||||
} catch (_) {}
|
||||
chatRenderer.addMessage('assistant', roundText, model, meta_);
|
||||
uiModule.scrollHistory();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user