Commit Graph
15 Commits
Author SHA1 Message Date
mstfyldz 58ae3655b6 fix: insert assistant digital-intern responses into chat_messages table 2026-08-14 12:06:19 +03:00
mstfyldz c4947422dc feat: add digital-intern live-qa endpoints for pinpoint hearing assistance 2026-08-14 11:48:49 +03:00
mstfyldz d3f91d4da6 fix: support both clientName and client_name in analyzeStrategy and analyzeMediation 2026-08-14 11:42:59 +03:00
mstfyldz d7a99a9db0 fix: add role-based strategic goals and winSteps to runStrategyAnalysis 2026-08-14 11:39:37 +03:00
mstfyldz 571e1f63d1 feat: Arabuluculuk & Müzakere Asistanı analiz endpoint'leri eklendi 2026-08-12 10:58:44 +03:00
mstfyldz 6299a269a1 feat: dava stratejisi olusturucu - analyzeStrategy endpoint 2026-08-11 17:02:18 +03:00
mstfyldz 5c8c676d45 feat: add deficiency analysis route 2026-08-11 16:30:22 +03:00
mstfyldz 05fcc00de9 revision 2026-08-11 16:27:02 +03:00
mstfyldzandClaude Sonnet 5 50f6cbb1b2 feat: narrative "Dosya Özeti" report instead of field-by-field JSON
summarizeCase now produces a full Markdown narrative report (Olayın
Özeti, Yargılama Süreci ve Kararlar, Taraf İddia/Savunmaları, Önemli
Bulgular ve Belgeler, Sonuç) instead of short structured fields - the
iddianame pre-analysis (when found) still runs first and is fed in as
context. The raw AI text is stored as {ozet: string} rather than
JSON-parsed, since asking the model to escape a multi-paragraph report
inside JSON was fragile.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-09 20:09:31 +03:00
mstfyldzandClaude Sonnet 5 c939dcf564 feat: iddianame-first case summary + remove hardcoded AI endpoint
- 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>
2026-08-09 20:00:06 +03:00
mstfyldzandClaude Sonnet 5 99d4d770d5 feat: add POST /api/cases/parties to store UYAP taraf bilgileri
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>
2026-08-09 19:29:53 +03:00
mstfyldzandClaude Sonnet 5 9f5c5c1e45 feat: add case-level AI summary endpoint
POST /api/cases/:caseId/summarize combines extracted text from all of
a case's documents and runs the existing AI analysis prompt, storing
the result as a case-level analysis (document_id: null). Powers the
"Özet Hazırla" button on the case detail screen.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-09 16:14:41 +03:00
mstfyldzandClaude Sonnet 5 5ddf6ce0cf feat: distinguish chat-only cases from real case files via kind column
New chat threads created from the Sohbet screen were creating rows in
the same cases table that Dava Dosyaları lists, so every new chat
showed up there too. createCase now accepts an optional kind
('case'|'chat', default 'case') so chat-only threads can be excluded.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-09 12:09:32 +03:00
mstfyldz 0e40aaef96 feat: add case creation endpoint and auto-title from first message
POST /api/cases lets the frontend actually create a new dava dosyası
(no working "Yeni Dosya" flow existed before). chatMessage now
generates a short title from a case's first message (like Claude/
ChatGPT auto-titling) and renames the case, returned as `newTitle`.
2026-08-09 10:34:55 +03:00
mstfyldz 7b354d4f96 feat: add DELETE /api/cases/:caseId to fully delete a case
Chat panel's trash icon should remove the whole case (not just clear
its chat history) — documents/analyses/chat_messages cascade-delete
via the existing ON DELETE CASCADE foreign keys.
2026-08-09 10:26:36 +03:00