Commit 528de50
committed
fix: tool confirmation for coded agents (create_agent)
Three fixes for coded agent tool confirmation:
1. hitl.py: @requires_approval now stamps REQUIRE_CONVERSATIONAL_CONFIRMATION
metadata so the runtime can discover confirmation tools.
2. runtime.py: _get_tool_confirmation_info handles both graph shapes —
UiPathToolNode (low-code, bound.tool) and LangGraph ToolNode
(create_agent, bound.tools_by_name).
3. messages.py: seed chunk accumulator with an empty AIMessageChunk instead
of the incoming message. Prevents self-merge on the first streaming chunk
which doubled tool names (e.g. search_websearch_web) and broke the
confirmation set lookup.1 parent da450a3 commit 528de50
File tree
3 files changed
+31
-13
lines changed- src/uipath_langchain
- chat
- runtime
3 files changed
+31
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
224 | 228 | | |
225 | 229 | | |
226 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
| 326 | + | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
497 | 510 | | |
498 | | - | |
499 | | - | |
500 | | - | |
| 511 | + | |
| 512 | + | |
501 | 513 | | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
511 | 525 | | |
512 | 526 | | |
513 | 527 | | |
| |||
0 commit comments