refactor(export): שם קובץ טיוטת-הביניים → טיוטה-טענות_הצדדים_{N} (הנחיית חיים)
במקום "טיוטת-ביניים-v{N}.docx" — שם מדבר יותר: "טיוטה-טענות_הצדדים_{N}.docx".
הפורמט הסופי ("טיוטה-v{N}") לא משתנה.
- docx_exporter._draft_naming: (prefix, sep) פר-מצב; interim=("טיוטה-טענות_הצדדים","_"),
final=("טיוטה","-v"). glob/parse משתמשים ב-rsplit(sep,1) — נכון גם כשה-prefix
עצמו מכיל "_".
- app.py _generation_output_ready + frontend pickLatestVersioned: matcher-prefix
מעודכן; regex-הגרסה עוגן-לסוף /[_v](\d+)$/ (ה-"_" שבתוך הprefix לא מבלבל).
- docstrings + legal-ceo.md + הערות מעודכנים לשם החדש. types.ts (auto-gen)
יתעדכן ב-api:types.
שינוי-נתון (שם-קובץ), לא layout — בגדר חריג-שער-העיצוב. tsc+eslint+py_compile
ירוקים. הערה: ייצור-השם רץ ב-MCP המקומי (host) → דורש reload; ה-matchers
בקונטיינר (Coolify).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3213,7 +3213,7 @@ async def api_party_claims_summary(case_number: str):
|
||||
# Wakeup goes through the Paperclip API helper (pc_wake_ceo_for_action → the
|
||||
# platform Port → POST /api/agents/{id}/wakeup), NEVER a direct DB insert.
|
||||
# Polling for completion uses the existing read endpoints (research/party-claims-
|
||||
# summary for the summary; the exports list for the טיוטת-ביניים-*.docx file).
|
||||
# summary for the summary; the exports list for the טיוטה-טענות_הצדדים_*.docx file).
|
||||
|
||||
|
||||
async def _wake_ceo_action(case_number: str, action: str) -> dict:
|
||||
@@ -3246,7 +3246,7 @@ async def api_generate_party_claims_summary(case_number: str):
|
||||
async def api_generate_interim_draft(case_number: str):
|
||||
"""Fire-and-accept: wake the CEO to generate the partial "party-claims" draft
|
||||
(שלב H → write_interim_draft + export_interim_draft). Runs host-side; poll the
|
||||
exports list for the new טיוטת-ביניים-{case}-vN.docx."""
|
||||
exports list for the new טיוטה-טענות_הצדדים_{N}.docx."""
|
||||
return await _wake_ceo_action(case_number, "interim_draft")
|
||||
|
||||
|
||||
@@ -3261,12 +3261,12 @@ def _generation_output_ready(case_number: str, action: str) -> bool:
|
||||
if action == "party_claims_summary":
|
||||
from legal_mcp.services import party_claims_summary as pcs
|
||||
return pcs.summary_file_path(case_number).exists()
|
||||
# interim_draft → a "טיוטת-ביניים-{case}-*.docx" file in the case exports dir.
|
||||
# interim_draft → a "טיוטה-טענות_הצדדים_*.docx" file in the case exports dir.
|
||||
export_dir = config.find_case_dir(case_number) / "exports"
|
||||
if not export_dir.exists():
|
||||
return False
|
||||
return any(
|
||||
f.is_file() and f.suffix.lower() == ".docx" and f.name.startswith("טיוטת-ביניים-")
|
||||
f.is_file() and f.suffix.lower() == ".docx" and f.name.startswith("טיוטה-טענות_הצדדים_")
|
||||
for f in export_dir.iterdir()
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user