feat: add multi-select input variable type - #259
Open
ddddajie wants to merge 1 commit into
Open
Conversation
|
All contributors on this pull request have signed the CLA. |
Author
|
I have read the CLA Document and I hereby sign the CLA |
9 tasks
ddddajie
force-pushed
the
feat/40575-multi-select-input-type
branch
from
August 21, 2026 02:24
dd5fecf to
896c821
Compare
5 tasks
Author
|
Hi @WH-2099 , could you please take a look at this PR when you have a chance? This is a small prerequisite for langgenius/dify#40575. It only adds VariableEntityType.MULTI_SELECT while reusing the existing ARRAY_STRING runtime type, with focused validation/serialization coverage (2 files, +25 lines; 14 targeted tests passing; CLA signed). The Dify-side implementation is already prepared and is currently waiting on this Graphon prerequisite before final integration and the upstream Dify PR. Happy to make any changes you think are needed. Thanks! |
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.
Important
!Related Issue
Related to langgenius/dify#40575
Summary
Add a new
MULTI_SELECTmember toVariableEntityTypeso consumers can represent user inputs that allow selecting multiple predefined values.This is a prerequisite for supporting native multi-select / checkbox-group inputs in Dify Start Nodes.
The change only introduces the input variable type. Existing Graphon
array[string]runtime support is reused, so no new segment type or runtime behavior is introduced.Changes
VariableEntityType.MULTI_SELECT = "multi-select"VariableEntity"multi-select"Tests
Targeted tests:
tests/variables/test_input_entities.pyResult:
14 passedAlso verified:
VariableEntity.model_validate()accepts"multi-select"model_dump(mode="json")serializes the type as"multi-select"SegmentType.ARRAY_STRINGsupport handles typed empty arraysChecklist