From ef4536a43743bfe9a61d8fe5ff42c285b578c657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Wed, 24 Jun 2026 14:43:22 +0400 Subject: [PATCH] =?UTF-8?q?v1.0.174:=20classify=20tab=20in=20prompts=20UI?= =?UTF-8?q?=20=E2=80=94=20activePromptId=20+=20openPromptModal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/app.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/deploy/app.js b/deploy/app.js index c821573..28650b1 100644 --- a/deploy/app.js +++ b/deploy/app.js @@ -692,15 +692,22 @@ var promptModalOverlay = document.getElementById('promptModalOverlay'); var promptModalTitle = document.getElementById('promptModalTitle'); var promptName = document.getElementById('promptName'); var promptNotes = document.getElementById('promptNotes'); -var activePromptId = {extract: '', diff: ''}; +// Три роли промптов: +// extract — извлечение строк из первого документа (базовый договор) +// diff — сравнение допсоглашений (ADD/UPDATE/DELETE) +// classify — классификация документа (тип, номер, контрагент, дата) +var activePromptId = {extract: '', diff: '', classify: ''}; function openPromptModal(role) { promptRole = role; - promptModalTitle.textContent = 'Промпт: ' + (role === 'extract' ? 'Извлечение' : 'Сравнение'); + var labels = {extract: 'Извлечение', diff: 'Сравнение', classify: 'Классификация'}; + promptModalTitle.textContent = 'Промпт: ' + (labels[role] || role); document.getElementById('promptTabExtract').style.background = role === 'extract' ? 'var(--brand-primary)' : ''; document.getElementById('promptTabExtract').style.color = role === 'extract' ? '#fff' : ''; document.getElementById('promptTabDiff').style.background = role === 'diff' ? 'var(--brand-primary)' : ''; document.getElementById('promptTabDiff').style.color = role === 'diff' ? '#fff' : ''; + document.getElementById('promptTabClassify').style.background = role === 'classify' ? 'var(--brand-primary)' : ''; + document.getElementById('promptTabClassify').style.color = role === 'classify' ? '#fff' : ''; promptStatus.textContent = ''; promptName.value = ''; promptNotes.value = ''; @@ -802,6 +809,8 @@ document.getElementById('promptSave').addEventListener('click', function() { document.getElementById('promptTabExtract').addEventListener('click', function() { openPromptModal('extract'); }); document.getElementById('promptTabDiff').addEventListener('click', function() { openPromptModal('diff'); }); +document.getElementById('promptTabClassify').addEventListener('click', function() { openPromptModal('classify'); }); document.getElementById('promptBtnExtract').addEventListener('click', function() { openPromptModal('extract'); }); document.getElementById('promptBtnDiff').addEventListener('click', function() { openPromptModal('diff'); }); +document.getElementById('promptBtnClassify').addEventListener('click', function() { openPromptModal('classify'); }); lucide.createIcons();