Skip to content

tool plugin add param type dynamic-tree-select#321

Open
zyqzyq wants to merge 1 commit into
langgenius:mainfrom
zyqzyq:feat/add_param_dynamic_tree_select
Open

tool plugin add param type dynamic-tree-select#321
zyqzyq wants to merge 1 commit into
langgenius:mainfrom
zyqzyq:feat/add_param_dynamic_tree_select

Conversation

@zyqzyq
Copy link
Copy Markdown

@zyqzyq zyqzyq commented May 13, 2026

Description

Add dynamic-tree-select parameter type support to the plugin daemon, enabling tool parameters to render hierarchical tree-structured options with dynamic loading. This is the plugin-daemon counterpart of the Dify main repo change in #35837.

Fixes langgenius/dify#35837

Compatibility Check

  • I have checked whether this change affects the backward compatibility of the plugin declared in README.md
  • I have checked whether this change affects the forward compatibility of the plugin declared in README.md
  • If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the README.md
  • I have described the compatibility impact and the corresponding version number in the PR description
  • I have checked whether the plugin version is updated in the README.md

Available Checks

  • just build has passed
  • Relevant documentation has been updated (if necessary)

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for a hierarchical selection tree via a new dynamic-tree-select parameter type. Key changes include adding a recursive children field to ParameterOption, updating the CommonParameterType and ToolParameterType enums, and introducing a multiple field for tool parameters. A unit test was also added to verify the fetching of nested parameter options. Feedback was provided regarding the default field's type hint in ToolParameter, which should be expanded to include bool and list types to maintain consistency when the multiple attribute is used.

)
llm_description: str | None = None
required: bool | None = False
multiple: bool | None = False
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The multiple field is added here, but the default field on line 120 still uses a restricted type hint (int | float | str | None). Since multiple=True implies a list, and other types like BOOLEAN or CHECKBOX require bool or list, the default type hint should be updated to int | float | str | bool | list | None for consistency and correct validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add tool plugin param dynamic-tree-select support tree param

1 participant