fix(tools): isolate plugin runtime state
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
Xubin Ren
co-authored by
Cursor
parent
043f0e67f7
commit
23312d683e
@@ -79,8 +79,7 @@ class MessageTool(Tool, ContextAware):
|
||||
self._default_channel.set(ctx.channel)
|
||||
self._default_chat_id.set(ctx.chat_id)
|
||||
self._default_message_id.set(ctx.message_id)
|
||||
if ctx.metadata:
|
||||
self._default_metadata.set(ctx.metadata)
|
||||
self._default_metadata.set(dict(ctx.metadata or {}))
|
||||
|
||||
def set_send_callback(self, callback: Callable[[OutboundMessage], Awaitable[None]]) -> None:
|
||||
"""Set the callback for sending messages."""
|
||||
|
||||
Reference in New Issue
Block a user