refactor: update input variable types to use PipelineInputVarType and simplify form data handling

This commit is contained in:
twwu
2025-05-19 16:26:13 +08:00
parent 8d4ced227e
commit bd1073ff1a
15 changed files with 194 additions and 151 deletions

View File

@ -1,6 +1,7 @@
import { InputVarType } from '@/app/components/workflow/types'
import { AgentStrategy } from '@/types/app'
import { PromptRole } from '@/models/debug'
import { PipelineInputVarType } from '@/models/pipeline'
export let apiPrefix = ''
export let webPrefix = ''
@ -162,6 +163,15 @@ export const VAR_ITEM_TEMPLATE_IN_WORKFLOW = {
options: [],
}
export const VAR_ITEM_TEMPLATE_IN_PIPELINE = {
variable: '',
label: '',
type: PipelineInputVarType.textInput,
max_length: DEFAULT_VALUE_MAX_LEN,
required: true,
options: [],
}
export const appDefaultIconBackground = '#D5F5F6'
export const NEED_REFRESH_APP_LIST_KEY = 'needRefreshAppList'