(options = {})
| 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))}"]`); |
no test coverage detected