tool plugin add param type dynamic-tree-select#321
Conversation
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Description
Add
dynamic-tree-selectparameter 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
README.mdREADME.mdREADME.mdREADME.mdAvailable Checks
just buildhas passed