refactor: 移动JSON-RPC模块到公共位置并修复模板导入显示问题

- 将JSON-RPC模块从ai_video移动到utils作为公共模块
- 更新所有相关文件的导入路径
- 重构template_manager.py使用标准JSON-RPC协议
- 修复模板导入成功但前端显示失败的问题
- 添加模板相关的错误码定义
- 改进进度报告使用JSON-RPC通知
- 移除旧的直接JSON输出代码

修复内容:
- python_core/utils/jsonrpc.py: 新增公共JSON-RPC模块
- python_core/services/template_manager.py: 使用JSON-RPC协议
- python_core/ai_video/video_generator.py: 更新导入路径
- python_core/ai_video/api_client.py: 更新导入路径
This commit is contained in:
root
2025-07-10 21:07:14 +08:00
parent 855a3bc757
commit 7edf8b7335
4 changed files with 33 additions and 38 deletions

View File

@@ -14,7 +14,7 @@ from typing import Dict, Any, Optional, Callable
import sys
from python_core.config import settings
from python_core.utils import setup_logger
from python_core.ai_video.jsonrpc import create_progress_reporter
from python_core.utils.jsonrpc import create_progress_reporter
logger = setup_logger(__name__)