fix(tools): forward set_runtime_context through OperationTool to base_tool

OperationTool wraps builtin tools for multi-operation support but did not
forward set_runtime_context, causing OpenClawTool to miss uploaded_files
and conversation_id when used with operation routing.
This commit is contained in:
miao
2026-04-09 20:01:07 +08:00
parent b875626f18
commit 7842435321

View File

@@ -11,6 +11,11 @@ class OperationTool(BaseTool):
self.base_tool = base_tool
self.operation = operation
super().__init__(base_tool.tool_id, base_tool.config)
def set_runtime_context(self, **kwargs):
"""转发运行时上下文到 base_tool"""
if hasattr(self.base_tool, 'set_runtime_context'):
self.base_tool.set_runtime_context(**kwargs)
@property
def name(self) -> str: