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
51.52k stars 7.45k forks source link

Wrong message when no custom tool available in custom tool list. #10584

Open weimzh opened 1 day ago

weimzh commented 1 day ago

Self Checks

Dify version

0.11.1

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. open https://cloud.dify.ai/tools?category=api
  2. make sure list of custom tools is empty.

✔️ Expected Behavior

show "no custom tool available, click 'Create custom tool' to add one" or something similar.

❌ Actual Behavior

Shows: "No workflow tool available, Go to "Workflow -> Publish as Tool"", which is misleading.

dosubot[bot] commented 1 day ago

Hey @weimzh! 👋 I'm here to help you with bugs, questions, or becoming a contributor. I'll assist you while we wait for a human maintainer.

The issue you're encountering is due to the incorrect message being displayed when no custom tools are available. The message currently shown is intended for workflow tools, not custom tools. To resolve this, the message logic needs to be updated to differentiate between the absence of custom tools and workflow tools.

The message for "No workflow tool available" is defined in the addToolModal section of the codebase, specifically in the translation files like web/i18n/en-US/tools.ts [1]. To fix the issue, you would need to modify the logic that determines which message to display based on the context (i.e., whether the list pertains to custom tools or workflow tools) and update the translation files accordingly to reflect the correct message for each scenario.

To continue talking to Dosu, mention @dosu.