(docs: Iterable[Dict[str, Any]])
| 2824 | return "The GUI language is set to English; this reading report will be written in English." |
| 2825 | return "GUI 页面当前选择语言为中文;本次精读报告将按中文生成。" |
| 2826 | |
| 2827 | |
| 2828 | def _reading_task_payload(task: Optional[Dict[str, Any]]) -> Optional[Dict[str, Any]]: |
| 2829 | if not task: |
| 2830 | return None |
| 2831 | return {key: value for key, value in task.items() if key not in {"thread", "internal_docs"}} |
| 2832 | |
| 2833 | |
| 2834 | def _finish_reading_task(task_id: str) -> None: |
| 2835 | with _READING_TASK_LOCK: |
| 2836 | task = _READING_TASKS.get(task_id) |
| 2837 | if not task: |
| 2838 | return |
| 2839 | task["status"] = "running" |
| 2840 | task["progress_phase"] = "running" |
| 2841 | task["updated_at"] = _task_timestamp() |
| 2842 | user_id = str(task.get("user_id") or "") |
| 2843 | push_id = str(task.get("push_id") or "") |
| 2844 | response_language = str(task.get("response_language") or "zh") |
| 2845 | write_feishu = task.get("write_feishu") |
| 2846 | selected_numbers = list(task.get("selected_numbers") or []) |
| 2847 | docs = list(task.get("internal_docs") or []) |
| 2848 | created_docs_snapshot = list(task.get("created_docs") or []) |
| 2849 | completed_docs: List[Dict[str, Any]] = [] |
| 2850 | errors: List[str] = [] |
| 2851 |
no test coverage detected