Exceptions dictionary (exceptions.txt), per-jobs word list, docx report endpoint; LLM prompt knows org abbreviations

This commit is contained in:
Sadmin committed 2026-11-02 17:27:02 +03:00
1 parent e03b0bc1c6
commit 7df303ba0e
6 files changed
+166 -7

No files matched your search

+9 -2
View File
@@ -159,7 +159,7 @@ function render(r) {
"орфография/грамматика " + rep.lt_seconds + " с" +
(L.enabled ? " · пунктуация (LLM) " + (L.llm_seconds||0) + " с" + (L.llm_chunks_failed ? ", фрагментов не обработано: " + L.llm_chunks_failed : "") : " · LLM: " + esc(L.note || "не использовалась")) +
'<br>' + chips.join("") +
' <span style="float:right"><button class="btn" style="padding:4px 10px;font-size:12px" id="dl">Скачать отчёт</button></span></div>';
' <span style="float:right"><button class="btn" style="padding:4px 10px;font-size:12px;background:#6a3fa0" id="dlw">Отчёт (.docx)</button> <button class="btn" style="padding:4px 10px;font-size:12px;background:#555" id="dlw2">Словарь слов (txt)</button></span></div>';
const groups = {};
rep.findings.forEach(f => (groups[f.para] = groups[f.para] || []).push(f));
@@ -180,7 +180,14 @@ function render(r) {
$("report").innerHTML = info + (body || '<div class="panel">Замечаний не найдено.</div>');
document.querySelectorAll(".chip").forEach(ch => ch.onclick = () => filter(ch.dataset.f));
document.querySelectorAll(".repl").forEach(b => b.onclick = () => { navigator.clipboard.writeText(b.dataset.t); b.title = "скопировано"; });
const dl = $("dl"); if (dl) dl.onclick = download;
const dl = $("dlw"); if (dl) dl.onclick = () => { window.location = "/api/report/" + jobId + "/docx"; };
const dl2 = $("dlw2"); if (dl2) dl2.onclick = () => {
const top = (lastReport.fragments_top || []).map(x => x.count + " " + x.fragment).join("\r\n");
const a = document.createElement("a");
a.href = URL.createObjectURL(new Blob(["сколько фрагмент\r\n" + top], {type: "text/plain;charset=utf-8"}));
a.download = "spisok_slov.txt";
a.click();
};
}
function filter(f) {