diff --git a/python_core/utils/jsonrpc_enhanced.py b/python_core/utils/jsonrpc_enhanced.py index e770b6d..0087162 100644 --- a/python_core/utils/jsonrpc_enhanced.py +++ b/python_core/utils/jsonrpc_enhanced.py @@ -12,6 +12,7 @@ import sys import time import uuid import asyncio +from uuid import uuid4 from typing import Any, Dict, Optional, Union, Callable, List from dataclasses import dataclass, asdict from enum import Enum @@ -238,7 +239,7 @@ def create_response_handler() -> EnhancedJSONRPCResponse: """创建响应处理器""" return EnhancedJSONRPCResponse(uuid4()) -from uuid import uuid4 + def create_progress_reporter(total: int = 100) -> EnhancedProgressReporter: """创建进度报告器""" return EnhancedProgressReporter(uuid4(), total)