mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
feat(api): add node_title to HumanInputFormFilled events
This commit is contained in:
@ -46,6 +46,7 @@ def test_human_input_form_filled_stream_response_contains_rendered_content():
|
||||
node_execution_id="exec-1",
|
||||
node_id="node-1",
|
||||
node_type="human-input",
|
||||
node_title="Human Input",
|
||||
rendered_content="# Title\nvalue",
|
||||
action_id="Approve",
|
||||
action_text="Approve",
|
||||
@ -55,5 +56,6 @@ def test_human_input_form_filled_stream_response_contains_rendered_content():
|
||||
|
||||
assert resp.workflow_run_id == "run-1"
|
||||
assert resp.data.node_id == "node-1"
|
||||
assert resp.data.node_title == "Human Input"
|
||||
assert resp.data.rendered_content.startswith("# Title")
|
||||
assert resp.data.action_id == "Approve"
|
||||
|
||||
@ -95,6 +95,7 @@ def test_human_input_node_emits_form_filled_event_before_succeeded():
|
||||
assert isinstance(events[1], NodeRunHumanInputFormFilledEvent)
|
||||
|
||||
filled_event = events[1]
|
||||
assert filled_event.node_title == "Human Input"
|
||||
assert filled_event.rendered_content.endswith("Alice")
|
||||
assert filled_event.action_id == "Accept"
|
||||
assert filled_event.action_text == "Approve"
|
||||
|
||||
Reference in New Issue
Block a user