From 3e22fa5d7411d13a891c1f8b7b3a4fe7101ed371 Mon Sep 17 00:00:00 2001 From: Norman Le Date: Fri, 1 May 2026 17:17:25 -0400 Subject: [PATCH] feat: emit new event during interrupt trigger --- src/uipath/runtime/chat/protocol.py | 14 ++++++++++++++ src/uipath/runtime/chat/runtime.py | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/src/uipath/runtime/chat/protocol.py b/src/uipath/runtime/chat/protocol.py index cc86957..4669c75 100644 --- a/src/uipath/runtime/chat/protocol.py +++ b/src/uipath/runtime/chat/protocol.py @@ -43,6 +43,20 @@ async def emit_interrupt_event( """ ... + async def emit_executing_tool_call_event( + self, resume_trigger: UiPathResumeTrigger + ) -> None: + """Emit an executingToolCall event signaling tool execution is about to begin. + + Called for every durable interrupt (Paths 2/3/4) right before + wait_for_resume(). The bridge extracts tool info from the trigger + and emits the event to the client. + + Args: + resume_trigger: The trigger containing tool call info + """ + ... + async def emit_exchange_end_event(self) -> None: """Send an exchange end event.""" ... diff --git a/src/uipath/runtime/chat/runtime.py b/src/uipath/runtime/chat/runtime.py index 07753a2..d665e51 100644 --- a/src/uipath/runtime/chat/runtime.py +++ b/src/uipath/runtime/chat/runtime.py @@ -103,6 +103,11 @@ async def stream( for trigger in api_triggers: await self.chat_bridge.emit_interrupt_event(trigger) + await ( + self.chat_bridge.emit_executing_tool_call_event( + trigger + ) + ) resume_data = ( await self.chat_bridge.wait_for_resume()