[feat] Support Multi-Version Workflows (#11990)
Co-authored-by: hobo.l <hobo.l@binance.com> Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import { MAX_VAR_KEY_LENGTH, VAR_ITEM_TEMPLATE, VAR_ITEM_TEMPLATE_IN_WORKFLOW, getMaxVarNameLength } from '@/config'
|
||||
import { CONTEXT_PLACEHOLDER_TEXT, HISTORY_PLACEHOLDER_TEXT, PRE_PROMPT_PLACEHOLDER_TEXT, QUERY_PLACEHOLDER_TEXT } from '@/app/components/base/prompt-editor/constants'
|
||||
import {
|
||||
CONTEXT_PLACEHOLDER_TEXT,
|
||||
HISTORY_PLACEHOLDER_TEXT,
|
||||
PRE_PROMPT_PLACEHOLDER_TEXT,
|
||||
QUERY_PLACEHOLDER_TEXT,
|
||||
} from '@/app/components/base/prompt-editor/constants'
|
||||
import { InputVarType } from '@/app/components/workflow/types'
|
||||
|
||||
const otherAllowedRegex = /^[a-zA-Z0-9_]+$/
|
||||
|
||||
export const getNewVar = (key: string, type: string) => {
|
||||
const { max_length, ...rest } = VAR_ITEM_TEMPLATE
|
||||
const { ...rest } = VAR_ITEM_TEMPLATE
|
||||
if (type !== 'string') {
|
||||
return {
|
||||
...rest,
|
||||
|
Reference in New Issue
Block a user