feat: add output schema handling and display in NodeConfigPanel; implement buildVariableSpecDisplay function
This commit is contained in:
@@ -72,6 +72,13 @@ export type WorkflowVariableOption = {
|
||||
description: string
|
||||
}
|
||||
|
||||
export type WorkflowVariableSpecDisplay = {
|
||||
key: string
|
||||
label: string
|
||||
subtitle: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export type WorkflowNodeSpec = AIWorkflowNodeSpec
|
||||
|
||||
export type WorkflowDraftValidation = {
|
||||
@@ -110,6 +117,15 @@ export function buildVariableOption(variable: WorkflowVariableRef): WorkflowVari
|
||||
}
|
||||
}
|
||||
|
||||
export function buildVariableSpecDisplay(variable: WorkflowVariableSpec): WorkflowVariableSpecDisplay {
|
||||
return {
|
||||
key: variable.name,
|
||||
label: variable.label || variable.name,
|
||||
subtitle: [variable.name, variable.type].filter(Boolean).join(" · "),
|
||||
description: variable.description || "",
|
||||
}
|
||||
}
|
||||
|
||||
export function getNodeTitle(
|
||||
node: AIWorkflowDefinition["nodes"][number] | undefined,
|
||||
specs: AIWorkflowNodeSpec[] = []
|
||||
|
||||
Reference in New Issue
Block a user