langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
46.28k stars 6.53k forks source link

the code error "text in input form must be less than 48 characters" #8697

Closed jiagoumengxiang closed 2 hours ago

jiagoumengxiang commented 2 hours ago

Self Checks

Dify version

0.8.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

微信图片_20240924083033 微信图片_20240924083242

I also modified the env configuration file image

rebuild all docker compose image

✔️ Expected Behavior

Expand character limits

❌ Actual Behavior

微信图片_20240924083039
dosubot[bot] commented 2 hours ago

@jiagoumengxiang 你好!我是Dosu,一个可以帮助你解决错误、回答问题并成为贡献者的机器人。我在这里帮助你,等待人类维护者。

I found a similar open issue and discussions that might be relevant to your problem:

  1. Error in item: Invalid variable. - This discussion is still open and might provide some insights.
  2. Why this not work - Another open discussion that could be related.
  3. Increase the maximum length of the "paragraph" variable of the workflow input field. - This issue was closed by a pull request that removed the maximum length limit of the "paragraph" variable. You can check the pull request here.

For modifying the character limit, you might want to look into the FormItem component, which handles different types of input, including text input. Here is the relevant code snippet:

{
  type === InputVarType.textInput && (
    <input
      className="w-full px-3 text-sm leading-8 text-gray-900 border-0 rounded-lg grow h-8 bg-gray-50 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200"
      type="text"
      value={value || ''}
      onChange={e => onChange(e.target.value)}
      placeholder={t('appDebug.variableConfig.inputPlaceholder')!}
      autoFocus={autoFocus}
    />
  )
}

You may need to adjust the validation logic or configuration settings related to input text length in the codebase. Unfortunately, I couldn't find specific details on where the character limit is defined or how to modify it directly in the repository.

For more detailed guidance, you might want to explore the discussions and the closed issue mentioned above.

To continue talking to Dosu, mention @dosu.

jiagoumengxiang commented 2 hours ago

The start node has a default 48-character limit that I didn't notice