fix(appraiser-facts): route extraction through analyst wakeup (was silent 0)
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m38s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m38s
The "חלץ עובדות שמאיות" UI button hit POST /api/cases/{n}/extract-appraiser-facts
which called appraiser_facts_extractor inline — that shells out to the local
`claude` CLI, which is absent in the Coolify container, so every doc errored,
the per-doc try/except swallowed it, and the response was "completed, 0 facts".
Refactored the endpoint to wake the legal-analyst of the correct company via
Paperclip (same pattern as wake_curator_for_final), and surface
extraction_failed instead of "completed" when every doc errored.
This commit is contained in:
@@ -269,6 +269,26 @@ function PostSaveView({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{extractResult?.status === "queued" && (
|
||||
<div className="rounded-md border border-info/30 bg-info-bg px-2.5 py-2 text-[0.72rem] text-ink space-y-0.5">
|
||||
<p>
|
||||
<strong>נשלח לאנליטיקאי.</strong> ה-issue נפתח ב-Paperclip והחילוץ
|
||||
ירוץ ברקע. תראה comment בעברית עם התוצאה כשהוא יסיים — לרוב כמה
|
||||
דקות.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{extractResult?.status === "skipped" && (
|
||||
<div className="rounded-md border border-warn/40 bg-warn-bg px-2.5 py-2 text-[0.72rem] text-ink space-y-0.5">
|
||||
<p>
|
||||
<strong>לא ניתן להפעיל אוטומטית</strong> ({extractResult.reason}).
|
||||
הפעל ידנית מ-Claude Code:
|
||||
<code className="ms-1 select-all">mcp__legal-ai__extract_appraiser_facts</code>
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{extractResult?.status === "no_appraisals" && (
|
||||
<p className="text-[0.72rem] text-ink-muted">
|
||||
אין בתיק מסמכים מתויגים כ-שומה.
|
||||
@@ -320,8 +340,8 @@ function PostSaveView({
|
||||
|
||||
{pending && (
|
||||
<p className="text-[0.68rem] text-ink-muted leading-tight">
|
||||
החילוץ יכול להימשך כמה דקות — שומות ארוכות עוברות ניתוח פסקה אחר
|
||||
פסקה ע"י המודל.
|
||||
שולח לאנליטיקאי דרך Paperclip — לוקח שנייה. החילוץ עצמו ירוץ אצל
|
||||
האנליטיקאי וייתן comment כשיסיים.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user