Commit 98d12be
authored
fix(runners): support message modification in workflows via before_run_callback
Fixes a bug in `_run_node_async` where the return value of `before_run_callback` was being swallowed and discarded during workflow execution.
Changes introduced:
- Captures `corrected_user_message` from the callback response.
- Updates `node_input` and `ic.user_content` to pass the modified message into the Workflow graph engine.
- Pops the original un-sanitized user event from `ic.session.events` to prevent dirty duplicates in the conversation history before appending the modified event.1 parent 065f4ae commit 98d12be
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
532 | 543 | | |
533 | 544 | | |
534 | 545 | | |
| |||
0 commit comments