refactor(workflow): improve loading state rendering and enhance control prompt editor re-rendering logic

This commit is contained in:
twwu
2025-09-04 15:27:55 +08:00
parent 64fc0c9073
commit 313069a63e
4 changed files with 14 additions and 5 deletions

View File

@ -153,7 +153,7 @@ export const getConfiguredValue = (value: Record<string, any>, formSchemas: { va
const value = formSchema.default
newValues[formSchema.variable] = {
type: 'constant',
value: formSchema.default,
value: typeof formSchema.default === 'string' ? formSchema.default.replace(/\n/g, '\\n') : formSchema.default,
}
newValues[formSchema.variable] = correctInitialData(formSchema.type, newValues[formSchema.variable], value)
}