feat: enhance variable handling and UI components with business labels and descriptions

This commit is contained in:
mlogclub
2026-06-29 18:37:31 +08:00
parent 295c7b4bea
commit 87760d5e89
8 changed files with 166 additions and 85 deletions
@@ -3,6 +3,7 @@
import { OptionCombobox } from "@/components/option-combobox"
import {
buildVariableOption,
createRefValue,
refField,
refNodeId,
@@ -24,11 +25,7 @@ export function VariableSelector({
triggerClassName?: string
}) {
const selected = value ? `${refNodeId(value)}.${refField(value)}` : ""
const options = variables.map((variable) => ({
value: `${variable.nodeId}.${variable.field}`,
label: `${variable.nodeName}.${variable.label || variable.field}`,
description: variable.description,
}))
const options = variables.map(buildVariableOption)
return (
<OptionCombobox