make some overall QoL improvements
CI / check (22) (push) Failing after 15m53s
CI / check (24) (push) Failing after 15m50s

This commit is contained in:
Frederik Spirgi
2026-10-12 13:07:59 +02:00
parent f67d918d09
commit 7723125c93
11 changed files with 159 additions and 25 deletions
+15
View File
@@ -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");