diff --git a/web/app/components/workflow-app/hooks/use-workflow-run.ts b/web/app/components/workflow-app/hooks/use-workflow-run.ts index a5e2740d8c..445a6c9244 100644 --- a/web/app/components/workflow-app/hooks/use-workflow-run.ts +++ b/web/app/components/workflow-app/hooks/use-workflow-run.ts @@ -340,8 +340,17 @@ export const useWorkflowRun = () => { } featuresStore?.setState({ features: mappedFeatures }) - workflowStore.getState().setEnvironmentVariables(publishedWorkflow.environment_variables || []) - workflowStore.getState().setConversationVariables(publishedWorkflow.conversation_variables || []) + // slice description of env & chatVar + const newEnvList = (publishedWorkflow.environment_variables || []).map(env => ({ + ...env, + description: env.description.slice(0, 256), + })) + const newChatVarList = (publishedWorkflow.conversation_variables || []).map(chatVar => ({ + ...chatVar, + description: chatVar.description.slice(0, 256), + })) + workflowStore.getState().setEnvironmentVariables(newEnvList || []) + workflowStore.getState().setConversationVariables(newChatVarList || []) }, [featuresStore, handleUpdateWorkflowCanvas, workflowStore]) return {