Cancel PDF reading and OCR when the offer assistant closes

This commit is contained in:
2026-09-06 10:24:07 +03:00
parent d534ea20b9
commit 3ad9348c20
6 changed files with 109 additions and 25 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ const OfferAssistantSession = ({ tender }) => {
return calistir(async () => {
const { extractText } = await import('../services/pdfText');
if (!current()) return;
const r = await extractText(f);
const r = await extractText(f,{signal:lifetime.current.signal});
if (typeof r.text !== 'string' || !r.text.trim()) throw new Error('Dosyada okunabilir metin bulunamadı. Önceki kaynak değiştirilmedi. Başka bir dosya seçin.');
if (current()) { setMetin(r.text); setSourceName(f.name); setCevap(null); setDenetim(null); }
});