Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/uipath/runtime/chat/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +51 to +53

Args:
resume_trigger: The trigger containing tool call info
"""
...

async def emit_exchange_end_event(self) -> None:
"""Send an exchange end event."""
...
Expand Down
5 changes: 5 additions & 0 deletions src/uipath/runtime/chat/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ async def stream(

for trigger in api_triggers:
await self.chat_bridge.emit_interrupt_event(trigger)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@norman-le we already have emit_interrupt_event...

await (
self.chat_bridge.emit_executing_tool_call_event(
trigger
)
Comment on lines +106 to +109
)
Comment on lines 105 to +110
Comment on lines 105 to +110

resume_data = (
await self.chat_bridge.wait_for_resume()
Expand Down
Loading