RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
fix(go-agent): add VariableAssigner input form (#16902)
Hz_276941f7b413
diff --git a/internal/agent/component/variable_assigner.go b/internal/agent/component/variable_assigner.goindex c18869448b..8ed5684bb8 100644--- a/internal/agent/component/variable_assigner.go+++ b/internal/agent/component/variable_assigner.go@@ -129,6 +129,16 @@ func NewVariableAssignerComponent(params map[string]any) (Component, error) {// Name returns the registered component name.func (v *VariableAssignerComponent) Name() string { return v.name }+// GetInputForm returns the runtime input form consumed by the Agent UI.+func (v *VariableAssignerComponent) GetInputForm() map[string]any {+ return map[string]any{+ "items": map[string]any{+ "type": "line",+ "name": "Items",+ },+ }+}+// Invoke walks the param.variables list, evaluates each tuple against// the canvas state, and writes the result back unless the operator// returned an "ERROR:..." sentinel. The list of refs that werediff --git a/internal/agent/component/variable_assigner_test.go b/internal/agent/component/variable_assigner_test.goindex a644a46d9f..a21df59f52 100644--- a/internal/agent/component/variable_assigner_test.go+++ b/internal/agent/component/variable_assigner_test.go@@ -245,3 +245,20 @@ func TestVariableAssigner_Registered(t *testing.T) {t.Errorf("Name()=%q, want VariableAssigner", c.Name())}}++func TestVariableAssignerGetInputForm(t *testing.T) {+ c, err := New("VariableAssigner", map[string]any{+ "variables": []map[string]any{},+ })+ if err != nil {+ t.Fatalf("New(VariableAssigner): %v", err)+ }+ getter, ok := c.(interface{ GetInputForm() map[string]any })+ if !ok {+ t.Fatal("VariableAssigner component does not expose GetInputForm")+ }+ items, ok := getter.GetInputForm()["items"].(map[string]any)+ if !ok || items["type"] != "line" || items["name"] != "Items" {+ t.Errorf("GetInputForm()[items] = %#v", items)+ }+}