@@ -27,31 +27,31 @@ class TaskManager:
2727
2828 def __init__ (
2929 self ,
30+ task_store : TaskStore ,
31+ context : ServerCallContext ,
3032 task_id : str | None ,
3133 context_id : str | None ,
32- task_store : TaskStore ,
3334 initial_message : Message | None ,
34- context : ServerCallContext ,
3535 ):
3636 """Initializes the TaskManager.
3737
3838 Args:
39+ task_store: The `TaskStore` instance for persistence.
40+ context: The `ServerCallContext` that this task is produced under.
3941 task_id: The ID of the task, if known from the request.
4042 context_id: The ID of the context, if known from the request.
41- task_store: The `TaskStore` instance for persistence.
4243 initial_message: The `Message` that initiated the task, if any.
4344 Used when creating a new task object.
44- context: The `ServerCallContext` that this task is produced under.
4545 """
4646 if task_id is not None and not (isinstance (task_id , str ) and task_id ):
4747 raise ValueError ('Task ID must be a non-empty string' )
4848
49+ self .task_store = task_store
50+ self ._call_context : ServerCallContext = context
4951 self .task_id = task_id
5052 self .context_id = context_id
51- self .task_store = task_store
5253 self ._initial_message = initial_message
5354 self ._current_task : Task | None = None
54- self ._call_context : ServerCallContext = context
5555 logger .debug (
5656 'TaskManager initialized with task_id: %s, context_id: %s' ,
5757 task_id ,
0 commit comments