PRD "AyrisLegal Google Drive Backup & Recovery" kapsamında sadece
backend altyapısı: OAuth connect/callback/status/disconnect/refresh
uç noktaları, AES-256-GCM token şifreleme (tokenCrypto.ts), tek
kullanımlık CSRF state (oauthState.ts), drive.file scope ile
AyrisLegal/Davalar klasör oluşturma (googleDriveClient.ts). Electron
tarafı (dosya tarama/kuyruk/UI) ayrı bir aşamada.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
800 token sınırı çok düşüktü — çok bölümlü hukuki cevaplar (kira feshi,
tazminat hesabı gibi) bu sınıra çarpıp cümlenin ortasında kesiliyordu.
Varsayılan ve chatMessage/sendThreadMessage'ın kullandığı num_predict
2048'e çıkarıldı. Ayrıca Ollama done_reason:"length" döndürdüğünde
(yanıt sınıra çarpıp kesildiğinde) sunucu loglarına uyarı yazılıyor.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Tüm AI çağrıları artık ortak lib/aiClient.ts üzerinden gidiyor:
- /v1/chat/completions yerine native /api/chat (think:false burada
güvenilir çalışıyor)
- keep_alive:30m ile model her istekte bellekten atılıp soğuk
başlamıyor
- num_predict ile öngörülemez uzunlukta üretime üst sınır
- İnteraktif sohbet uç noktaları (chatMessage, sendThreadMessage)
artık SSE ile token token akıtıyor
- Dosya sohbetinde varsayılan olarak belgenin tam metni değil analiz
özeti gönderiliyor; tam metin sadece kullanıcı açıkça isterse
eklenir
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- summarizeCase: if an iddianame is among the case's documents, run a
narrow first-pass analysis on it alone (isnatEdilenSuc, iddiaOzeti,
onemliTarihler), then feed that as context into the general
case-wide evaluation instead of treating every document equally.
- ANALYSIS_SYSTEM_PROMPT no longer asks the AI to guess "taraflar" -
that now comes from real UYAP data (cases.parties) instead.
- Removed the hardcoded RunPod proxy URL fallback from every call
site (document/chat/precedent controllers + lib/openai.ts) - it was
a real infra endpoint checked into source. New lib/aiConfig.ts
throws if RUNPOD_API_BASE_URL isn't set rather than silently
falling back to it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The UYAP extension now captures the davaci/davali/sanik + vekil data
from the "Taraf Bilgileri" tab and sends it once per case. This
endpoint finds/creates the matching case by title (same lookup used
by registerLocalDocument, now shared via lib/caseLookup.ts) and stores
it in a new cases.parties column - a much more reliable source for
the case detail screen's "Taraflar" info than the AI's own guess from
OCR'd document text.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>