MicroFish/backend/app/services
andreicarpen 0387dc7210 feat(report): allow resuming report generation after failure
When report generation in Step 4 fails mid-way (e.g. AI credits exhausted,
network error), users previously had to restart from scratch, losing the
outline and any already-completed sections.

This change preserves partial progress and lets users continue from where
generation stopped:

- Backend: `generate_report(resume=True)` reloads the saved outline and
  per-section markdown files, skips the planning phase, and only generates
  the missing sections. The `/api/report/generate` endpoint accepts a
  `resume` flag and reuses the failed report's `report_id`.
- Frontend: Step4Report polls `/progress` and, when `status === 'failed'`,
  shows a "Resume Generation" banner with the failure message and a button
  that calls `generateReport({ simulation_id, resume: true })` and
  restarts log polling.
- Adds `resumeStart` / `sectionResumed` / `reportFailedTitle` /
  `resumeGeneration` locale keys in en and zh.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 16:48:58 +03:00
..
__init__.py Implement Interview feature for agent interactions in simulations 2025-12-08 15:55:39 +08:00
graph_builder.py fix(i18n): pass locale to background threads via thread-local storage 2026-04-01 16:55:51 +08:00
oasis_profile_generator.py feat(i18n): replace remaining Chinese in config generator and profile generator 2026-04-01 17:19:12 +08:00
ontology_generator.py Merge pull request #428 from Ghostubborn/feat/i18n 2026-04-02 14:27:04 +08:00
report_agent.py feat(report): allow resuming report generation after failure 2026-04-18 16:48:58 +03:00
simulation_config_generator.py feat(i18n): replace remaining Chinese in config generator and profile generator 2026-04-01 17:19:12 +08:00
simulation_ipc.py Implement Interview feature for agent interactions in simulations 2025-12-08 15:55:39 +08:00
simulation_manager.py feat(i18n): replace remaining hardcoded Chinese in progress callbacks 2026-04-01 16:53:29 +08:00
simulation_runner.py fix(i18n): pass locale to background threads via thread-local storage 2026-04-01 16:55:51 +08:00
text_processor.py Introduce Project ID for context management, finalizing the stateful API pipeline from file submission to graph construction. 2025-11-28 17:21:08 +08:00
zep_entity_reader.py feat(graph): implement pagination for fetching nodes and edges; add utility functions for streamlined data retrieval 2026-02-27 15:53:29 +08:00
zep_graph_memory_updater.py fix(i18n): pass locale to background threads via thread-local storage 2026-04-01 16:55:51 +08:00
zep_tools.py feat(i18n): replace all user-visible Chinese logger messages in zep_tools.py 2026-04-01 17:46:39 +08:00