MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / renderConferenceSettings

Function renderConferenceSettings

deployments/desktop/static/desktop.js:5153–5197  ·  view source on GitHub ↗
(sourcePrefs = {})

Source from the content-addressed store, hash-verified

5151 renderChatSources(citations);
5152 } else {
5153 try {
5154 data = await streamWikiAsk(payload, answerTarget, message);
5155 } catch (streamError) {
5156 console.warn("Streaming Wiki ask failed, falling back to JSON.", streamError);
5157 showFeedbackToast("warning", ui().chat.streamInterruptedTitle, ui().chat.streamInterruptedDetail);
5158 data = await api("/api/wiki/ask", { method: "POST", timeoutMs: API_TIMEOUT_LONG_MS, body: JSON.stringify(payload) });
5159 const citations = normalizeCitations(data);
5160 const currentMeta = message.querySelector(".answer-meta");
5161 if (currentMeta) currentMeta.outerHTML = renderAnswerMeta(data, citations);
5162 await streamAnswerText(answerTarget, data.text || "", citations);
5163 renderChatSources(citations);
5164 }
5165 const citations = normalizeCitations(data);
5166 }
5167 if (data?.session_id) {
5168 state.chatSessionId = data.session_id;
5169 }
5170 try {
5171 await loadChatSessions();
5172 } catch (historyError) {
5173 console.warn("Chat history refresh failed.", historyError);
5174 const detail = isUnknownApiRoute(historyError, "/api/chat/sessions")
5175 ? ui().chat.historyRestartDetail
5176 : ui().chat.historyReloadDetail;
5177 showFeedbackToast("warning", ui().chat.historyRefreshFailedTitle, detail);
5178 }
5179 $("chatThread").scrollTop = $("chatThread").scrollHeight;
5180 } catch (error) {
5181 answerTarget.classList.remove("loading");
5182 answerTarget.innerHTML = `<p>${escapeHtml(ui().chat.generationFailed(error.message || String(error)))}</p>`;
5183 throw error;
5184 } finally {
5185 button.disabled = false;
5186 button.textContent = previousText;
5187 }
5188 }
5189
5190 function envMap(data) {
5191 const entries = data.editable_env || data.env || {};
5192 if (Array.isArray(entries)) {
5193 return Object.fromEntries(entries.filter((item) => item?.key).map((item) => [item.key, item]));
5194 }
5195 return Object.fromEntries(Object.entries(entries).map(([key, value]) => [
5196 key,
5197 typeof value === "object" && value !== null ? value : { key, value, is_secret: false, present: true }
5198 ]));
5199 }
5200

Callers 2

applyLocaleFunction · 0.85
renderSettingsFunction · 0.85

Calls 7

splitListValueFunction · 0.85
conferenceOptionLabelFunction · 0.85
uiFunction · 0.85
conferenceAccessInfoFunction · 0.85
formatConferenceTimelineFunction · 0.85
$Function · 0.70
escapeHtmlFunction · 0.70

Tested by

no test coverage detected