feat: add icon property to workflow node specifications and update related components

This commit is contained in:
mlogclub
2026-06-28 15:24:00 +08:00
parent 389291143a
commit 530cf145b2
12 changed files with 42 additions and 57 deletions
+1
View File
@@ -76,6 +76,7 @@ func BuildAIWorkflowNodeSpecs(list []workflowregistry.NodeSpec) []response.AIWor
Type: item.Type,
Title: item.Title,
Description: item.Description,
Icon: item.Icon,
RiskLevel: item.RiskLevel,
Interruptible: item.Interruptible,
RequiresConfirmationPredecessor: item.RequiresConfirmationPredecessor,
@@ -19,6 +19,9 @@ func TestBuildAIWorkflowNodeSpecsIncludesVariableContracts(t *testing.T) {
switch spec.Type {
case workflowregistry.NodeTypeStart:
startFound = true
if spec.Icon != "PlayCircleIcon" {
t.Fatalf("expected start icon PlayCircleIcon, got %q", spec.Icon)
}
if !hasResponseVariable(spec.OutputSchema, "userMessage") {
t.Fatalf("expected start output userMessage, got %#v", spec.OutputSchema)
}