diff --git a/src/new/services/placeholder_service.py b/src/new/services/placeholder_service.py new file mode 100644 index 0000000..7c54872 --- /dev/null +++ b/src/new/services/placeholder_service.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +""" +PlaceholderService —— 通用占位后端(用于尚未迁移的步骤) + +返回 ``{"status": "not_implemented", ...}``,main_router 据此在日志区 +输出友好提示;不抛异常、不阻塞 UI 线程。 +""" + +from __future__ import annotations + +from typing import Any, Dict + + +def execute_placeholder(config: Dict[str, Any]) -> Dict[str, Any]: + """通用占位执行函数 + + Args: + config: 由 view.get_config() 序列化、再经 main_router 注入 work_dir 的字典 + + Returns: + 标准结果字典 ``{status, output_path, message}``,其中 status="not_implemented" + """ + step_id = config.get("step_id") or config.get("_step_id") or "unknown" + return { + "status": "not_implemented", + "output_path": None, + "message": f"not_implemented: [{step_id}] 端到端模块化尚未迁移此步骤;后续将按 step1 模式补全 view/service。", + } \ No newline at end of file