From f03ba9160a7a166fca3544f2433c5c936e9ca1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Fri, 19 Jun 2026 07:49:51 +0400 Subject: [PATCH] =?UTF-8?q?v1.0.46:=20=D0=BF=D1=80=D0=BE=D0=BC=D0=BF=D1=82?= =?UTF-8?q?=20=D0=BD=D0=B0=20=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80=D0=B5=20?= =?UTF-8?q?=E2=80=94=20extractor=20=D1=87=D0=B8=D1=82=D0=B0=D0=B5=D1=82=20?= =?UTF-8?q?=D0=B8=D0=B7=20=D0=91=D0=94,=20UI=20=D1=81=D0=BE=D1=85=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D1=8F=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extractor.cfm | 17 ++++++++++++++++- index.cfm | 26 +++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/extractor.cfm b/extractor.cfm index 8426368..dae559a 100644 --- a/extractor.cfm +++ b/extractor.cfm @@ -52,6 +52,18 @@ + + + diff --git a/index.cfm b/index.cfm index a361c07..9fd14e5 100644 --- a/index.cfm +++ b/index.cfm @@ -61,7 +61,7 @@
Nubes - Сверка договоров — LLM v1.0.45 — Lucee + Сверка договоров — LLM v1.0.46 — Lucee
@@ -318,6 +318,16 @@ document.getElementById('llmBtn').addEventListener('click', async function() { btn.disabled = true; btn.innerHTML = ' LLM-анализ...'; + // Сохранить промпт на сервер + var p = promptEditor.value.trim() || DEFAULT_PROMPT; + if (contractId) { + fetch('/prompt.cfm?contract_id=' + contractId, { + method: 'POST', + headers: {'Content-Type': 'application/json'}, + body: JSON.stringify({prompt: p}) + }); + } + var diffCard = document.getElementById('diffCard'); var diffBody = document.getElementById('diffBody'); var diffStatus = document.getElementById('diffStatus'); @@ -471,12 +481,26 @@ document.getElementById('promptSave').addEventListener('click', function() { localStorage.setItem('llm_prompt', p); document.getElementById('promptStatus').textContent = '✓ сохранено'; setTimeout(function() { document.getElementById('promptStatus').textContent = ''; }, 1500); + if (contractId) { + fetch('/prompt.cfm?contract_id=' + contractId, { + method: 'POST', + headers: {'Content-Type': 'application/json'}, + body: JSON.stringify({prompt: p}) + }); + } }); document.getElementById('promptReset').addEventListener('click', function() { promptEditor.value = DEFAULT_PROMPT; localStorage.removeItem('llm_prompt'); document.getElementById('promptStatus').textContent = '✓ сброшен'; setTimeout(function() { document.getElementById('promptStatus').textContent = ''; }, 1500); + if (contractId) { + fetch('/prompt.cfm?contract_id=' + contractId, { + method: 'POST', + headers: {'Content-Type': 'application/json'}, + body: JSON.stringify({prompt: ''}) + }); + } });