fix(api): fix human input form substitution

Fix the issues that output fields are not properly replaced for
humaninput form.
This commit is contained in:
QuantumGhost
2026-01-04 16:50:24 +08:00
parent 3ab1ad6530
commit e6eb879c61
5 changed files with 14 additions and 23 deletions

View File

@ -221,11 +221,11 @@ class TestHumanInputNodeData:
A content is required:
{{#$outputs.content#}}
{{#$output.content#}}
A ending is required:
{{#$outputs.ending#}}
{{#$output.ending#}}
"""
node_data = HumanInputNodeData(title="Human Input", form_content=content)
@ -407,7 +407,7 @@ class TestHumanInputNodeRenderedContent:
node_data = HumanInputNodeData(
title="Human Input",
form_content="Name: {{#$outputs.name#}}",
form_content="Name: {{#$output.name#}}",
inputs=[
FormInput(
type=FormInputType.TEXT_INPUT,

View File

@ -22,7 +22,7 @@ class _FakeFormRepository:
return self._form
def _build_node(form_content: str = "Please enter your name:\n\n{{#$outputs.name#}}") -> HumanInputNode:
def _build_node(form_content: str = "Please enter your name:\n\n{{#$output.name#}}") -> HumanInputNode:
system_variables = SystemVariable.empty()
system_variables.workflow_execution_id = str(uuid.uuid4())
graph_runtime_state = GraphRuntimeState(