Analyze server-resolved document reviews with revision checks

This commit is contained in:
2026-09-06 09:49:30 +03:00
parent e49593be46
commit 742e05933e
11 changed files with 87 additions and 18 deletions
+2 -2
View File
@@ -13,11 +13,11 @@ export async function getAiConfig() {
}
}
export async function analyzeSpecText({ text, fileName, tender, chain, mode, extraction }) {
export async function analyzeSpecText({ text, fileName, tender, chain, mode, extraction, reviewedSource }) {
const res = await fetch('/api/ai/analyze', {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${getToken()}` },
body: JSON.stringify({ text, fileName, tender, chain, mode, extraction }),
body: JSON.stringify({ text, fileName, tender, chain, mode, extraction, reviewedSource }),
});
const data = await res.json().catch(() => ({}));
if (!data.success) {
+1
View File
@@ -33,6 +33,7 @@ export function bidSourceSnapshot(tender, results, rows = sourceRows(tender, res
deadline: [tender?.tarih || '', tender?.saat || ''],
documentVersion: results?.documentVersion ?? tender?.documentVersion ?? null,
procurementTerms: results?.procurementTerms || null,
humanReview: results?.sourceReview?.humanReview || null,
analyzedItems: results?.itemsAndSpecs || [],
rows: rows.map(r => r.priceKey).sort(),
documents: results?.documentChecklist || [],