make some overall QoL improvements
This commit is contained in:
@@ -23,10 +23,19 @@ export function createMessageRenderer({
|
||||
}) {
|
||||
const jumpToLatest = document.getElementById("jumpToLatest");
|
||||
const searchInput = document.getElementById("conversationSearch");
|
||||
const searchToggle = document.getElementById("conversationSearchToggle");
|
||||
const searchBar = document.getElementById("conversationSearchBar");
|
||||
const searchCount = document.getElementById("conversationSearchCount");
|
||||
const previousMatch = document.getElementById("conversationSearchPrevious");
|
||||
const nextMatch = document.getElementById("conversationSearchNext");
|
||||
const replyAnnouncement = document.getElementById("replyAnnouncement");
|
||||
searchToggle?.addEventListener("click", () => {
|
||||
const expanded = searchToggle.getAttribute("aria-expanded") !== "true";
|
||||
searchToggle.setAttribute("aria-expanded", String(expanded));
|
||||
searchBar.classList.toggle("is-open", expanded);
|
||||
if (expanded) searchInput.focus();
|
||||
else searchToggle.focus();
|
||||
});
|
||||
|
||||
let scrollFrame = null;
|
||||
|
||||
@@ -232,6 +241,12 @@ export function createMessageRenderer({
|
||||
actions.setAttribute("aria-label", "Message actions");
|
||||
const activeChat = getChatById(state.activeChatId);
|
||||
header.textContent = isMessageUser ? "You" : (activeChat?.assistant_persona_name || "Assistant");
|
||||
if (!isMessageUser && Array.isArray(message.sources) && message.sources.length) {
|
||||
const webBadge = document.createElement("span");
|
||||
webBadge.className = "msg-web-badge";
|
||||
webBadge.textContent = "Used web results";
|
||||
header.append(webBadge);
|
||||
}
|
||||
setMessageContent(body, message.content);
|
||||
|
||||
const copyBtn = document.createElement("button");
|
||||
|
||||
Reference in New Issue
Block a user