Commit Graph

95 Commits

Author SHA1 Message Date
yuqei 69ce717ec6 feat: support runtime shared AI settings 2026-06-22 10:13:04 +08:00
yuqei 278bc28416 fix: fallback chat history when ai config missing 2026-06-21 19:15:21 +08:00
yuqei 17f5ada9f2 fix: normalize markdown contract content 2026-06-21 18:57:53 +08:00
yuqei 76b9198b64 fix: stabilize file downloads and file workspace 2026-06-21 17:56:16 +08:00
yuqei a89f4c7050 Refactor contract platform workflows and UI 2026-06-21 17:51:34 +08:00
cyuqei 93089e2a89 feat: add backend approval sla tracking 2026-06-19 18:07:16 +08:00
cyuqei ae76b9a296 feat: add lifecycle reminder workbench 2026-06-19 11:23:32 +08:00
cyuqei 5bb330b610 feat: enhance contract workflow and approval assignees 2026-06-19 01:57:26 +08:00
cyuqei 175c0a69af feat: align deployment and approval workflow 2026-06-18 03:37:03 +08:00
yuqei 6d2edc6753 feat: migrate PDF/OCR extraction to shared-ai-platform
Remove all local PDF/OCR extraction and quality gate logic from
review_service.py, replacing it with calls to the shared-ai-platform
document extraction service via the SDK.

Removed from review_service.py:
- 17 local PDF/OCR methods (_extract_text_from_pdf, _classify_pdf_source,
  _extract_text_from_pdf_with_ocr, _extract_text_from_image_with_ocr,
  _evaluate_ocr_quality, _looks_like_platform_review_report, etc.)
- All PDF/OCR constants (PDF_TEXT_PATTERN, PDF_NOISE_LINE_PATTERN,
  REPORT_PDF_MARKERS, OCR_GATE_*, PDF_SOURCE_KIND_*, etc.)
- Imports: pdfplumber, pypdfium2, pytesseract, PIL.Image

Added:
- extract_review_upload_text() now calls shared platform's
  client.extract_document_text() directly
- _detect_upload_type() retained locally for upload validation only
- Protocol methods extract_document_text, classify_pdf_source in client

Removed from requirements.txt: pdfplumber, pytesseract
Added to config: shared_ai_platform_document_extraction_enabled

Also includes prior changes:
- Model settings and chat history stabilization
- Mobile UI polish
- Governance launch-closure enhancements

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 11:09:13 +08:00
yuqei 19ed42c880 feat: add model settings and stabilize chat history 2026-06-10 18:57:22 +08:00
yuqei 6c37d72179 feat: complete governance launch-closure enhancements
- Governance release summaries with launch readiness indicators
- Workbench reviewer completion condition constraints
- Asset detail blocker status display
- Imports page post-import action guidance
- Backend test coverage for governance services
- Production deployment handoff documentation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 10:00:55 +08:00
yuqei 739d2f51f9 feat: support image uploads in direct review flow
- accept png/jpg/jpeg in the uploaded-contract review path
- add local image OCR extraction and quality gating
- keep existing PDF/DOCX/TXT review behavior intact

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 19:42:15 +08:00
yuqei 1eae603c0f feat: refine core pc review and generation flows
- improve workspace and review entry UX for uploaded contracts
- stabilize shared AI Docker/frontend delivery path
- adapt shared AI generation to structured JSON responses

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 15:26:31 +08:00
yuqei b229699c39 更新合同API、提示词资产服务及前端页面 2026-05-31 22:23:15 +08:00
yuqei b76a2baad2 feat: comprehensive platform improvements (P0-P2 + landing split)
- Split landing page into public landing page and authenticated workspace
- Extract contract generation logic into use-contract-generation hook
- Extract contract generation service into sub-services
- Add AI quality scoring for contract generation
- Expand risk rules library with employment-specific rules
- Add custom exception classes (NotFoundError, ValidationError, etc.)
- Add prompt asset seeding script from LexForge documentation
- Add format utility library
- Fix SSR hydration mismatch on Ant Design inputs

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 17:39:27 +08:00
yuqei ea722e58eb Enhance contract generation governance 2026-05-28 11:01:57 +08:00
yuqei b5f4034328 Refine web governance and chat surfaces 2026-05-27 11:24:20 +08:00
yuqei 029fbfb5f6 Add UTF-8 safe Chinese template validation 2026-05-27 10:44:17 +08:00
yuqei 8d1615e1ed Harden mobile smoke and contract ownership rules 2026-05-27 09:48:35 +08:00
yuqei 8a126a3808 backend: harden legal article references 2026-05-25 18:25:12 +08:00
yuqei e423063940 Fix chat stream product e2e blockers 2026-05-24 23:14:23 +08:00
yuqei 53e5eb3bba feat: add business auxiliary prompts 2026-05-24 16:13:38 +08:00
yuqei 8c21e3aaa4 feat: add specialized generation prompts 2026-05-24 15:57:28 +08:00
yuqei ca60ddf620 feat: add specialized review prompts 2026-05-24 15:31:19 +08:00
yuqei dfcc9ac28d feat: align remaining template defaults 2026-05-24 14:43:20 +08:00
yuqei 8b81011eb6 feat: seed remaining contract templates 2026-05-24 12:58:13 +08:00
yuqei ee9ba1d1c6 feat: add investment agreement defaults 2026-05-24 12:15:13 +08:00
yuqei 2276a7388b feat: add shareholder resolution document defaults 2026-05-24 10:45:16 +08:00
yuqei a530d55fa9 feat: add valuation adjustment document defaults 2026-05-24 10:25:22 +08:00
yuqei 1bc416da9d feat: add intercompany loan document type 2026-05-24 09:02:15 +08:00
yuqei 0d46a53e86 feat: support filtered legal article vectorization 2026-05-24 08:04:54 +08:00
yuqei 8a8be8d15d feat: expose legal article vectorization in kpis 2026-05-24 07:45:00 +08:00
yuqei 26fdac2c4d feat: add legal article semantic search 2026-05-24 01:39:49 +08:00
yuqei 95680516bb feat: add legal article semantic vectorization 2026-05-24 00:51:27 +08:00
yuqei f9c9389ca7 feat: add quality eval metrics to operation kpis 2026-05-24 00:05:20 +08:00
yuqei b037a08169 feat: add unified quality eval domain and ui 2026-05-23 23:50:36 +08:00
yuqei 4931de0abd feat: expand phase13 templates and phase14 batches 2026-05-23 20:48:53 +08:00
yuqei 546a51256f feat: complete legal source inventory gap report 2026-05-22 18:08:01 +08:00
yuqei ea1ba2c35b feat: add legal source diff review 2026-05-22 17:39:30 +08:00
yuqei ed2ce8a40d feat: absorb phase13 templates rules clauses 2026-05-22 11:30:37 +08:00
yuqei 748aab08e0 feat: add clause recommendation funnel 2026-05-22 08:05:01 +08:00
yuqei f89d9d0057 feat: add contract delivery export diff 2026-05-21 21:33:28 +08:00
yuqei 464579e48f feat: close phase15 governance loops 2026-05-21 20:17:38 +08:00
yuqei 124e45df8c feat: track prompt evaluation runs 2026-05-21 18:15:17 +08:00
yuqei c415f547e8 feat: productize prompt evaluation gate 2026-05-21 18:04:14 +08:00
yuqei 8c8fc432bb feat: add contract lifecycle tasks 2026-05-21 17:08:47 +08:00
yuqei bb8323b6e1 feat: add contract lifecycle tracking 2026-05-21 16:16:52 +08:00
yuqei 5caaa40fb3 feat: add offline payment proof workflow 2026-05-21 15:37:40 +08:00
yuqei 3df85fdb04 feat: land phase15 legal docs and commercial ops
Includes legal document generation workflows, prompt governance runtime wiring, legal change impact scans, operation KPI dashboards, invoice files, sales follow-up events, mobile review polish, deployment automation, and updated project docs.
2026-05-21 14:42:44 +08:00