fix conversation var restore & description length check

This commit is contained in:
JzoNg 2025-08-12 16:05:06 +08:00 committed by QuantumGhost
parent d2f12037da
commit 53faf90bea
2 changed files with 3 additions and 0 deletions

View File

@ -341,6 +341,7 @@ export const useWorkflowRun = () => {
featuresStore?.setState({ features: mappedFeatures })
workflowStore.getState().setEnvironmentVariables(publishedWorkflow.environment_variables || [])
workflowStore.getState().setConversationVariables(publishedWorkflow.conversation_variables || [])
}, [featuresStore, handleUpdateWorkflowCanvas, workflowStore])
return {

View File

@ -62,6 +62,8 @@ const VariableModal = ({
// Original check for create new variable
if (!env && envList.some(e => e.name === name))
return notify({ type: 'error', message: 'name is existed' })
if (description.length > 256)
return notify({ type: 'error', message: 'description can not be longer than 256 characters' })
onSave({
id: env ? env.id : uuid4(),