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

Function startNewChat

deployments/desktop/static/desktop.js:4463–4476  ·  view source on GitHub ↗
(options = {})

Source from the content-addressed store, hash-verified

4461 }
4462
4463 function startNewChat(options = {}) {
4464 state.chatSessionId = "";
4465 state.chatLoadToken += 1;
4466 if ($("chatInput")) $("chatInput").value = "";
4467 clearChatMentions();
4468 window.clearTimeout(state.mentionSearchTimer);
4469 state.mentionSearchToken += 1;
4470 if ($("mentionSuggestions")) $("mentionSuggestions").hidden = true;
4471 resetChatThread();
4472 renderChatHistory({ sessions: state.chatHistory, groups: state.chatHistoryGroups });
4473 if (!options.silent) {
4474 showFeedbackToast("success", ui().chat.newChatToastTitle, ui().chat.newChatToastDetail);
4475 }
4476 }
4477
4478 function focusCitationSource(index) {
4479 const card = document.querySelector(`#chatSources [data-citation-index="${CSS.escape(String(index))}"]`);

Callers 2

loadChatSessionFunction · 0.85
bindEventsFunction · 0.85

Calls 6

clearChatMentionsFunction · 0.85
resetChatThreadFunction · 0.85
renderChatHistoryFunction · 0.85
showFeedbackToastFunction · 0.85
uiFunction · 0.85
$Function · 0.70

Tested by

no test coverage detected