feat(tool): support conditional parameter visibility - #323
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a show_on field to the tool parameter configuration, enabling conditional display logic for parameters. The reviewer suggested adding a description attribute to this new field to maintain consistency with existing fields and ensure proper documentation generation.
WH-2099
approved these changes
Aug 4, 2026
WH-2099
left a comment
Member
There was a problem hiding this comment.
Reviewed the schema contract against langgenius/dify#36148 and langgenius/dify-plugin-daemon#732. Field names, nesting, defaults, and the variable/value shape match. Local just check, just test, and just docs all pass; no blocking findings.
WH-2099
enabled auto-merge (squash)
August 4, 2026 08:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Thank you for your contribution! Before submitting your PR, please make sure you have completed the following checks:
Compatibility Check
Part of langgenius/dify#36141.
README.mdREADME.mdREADME.mdREADME.mdAvailable Checks
just buildhas passedNo documentation or version update is needed for this additive schema change.
Summary
Tool parameters and their select options now preserve optional show_on conditions from plugin YAML.
Both fields default to an empty list so existing manifests remain unchanged.
A focused round-trip test covers parameter-level conditions, option-level conditions, and omitted fields.
Compatibility impact
This is an additive SDK schema change with no public method or runtime protocol removal.
Existing manifests continue to validate with empty show_on lists.
End-to-end UI support remains coordinated with langgenius/dify#36148 and langgenius/dify-plugin-daemon#732.
Validation
uv run pytest tests/entities/test_tool.py -q(5 passed)just docsjust checkjust test(185 passed, 1 skipped)just build