mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
Dify has no native boolean start-variable type, so a bool requirement the Builder proposes gets emitted as a `select` — and the LLM often leaves its `options` empty. An options-less select renders as an empty, unfillable dropdown in the Builder's test-input form, so the user can never submit test data (affects every workflow whose requirements include a bool field). Add _normalize_start_select_variables to the generator postprocess (beside _normalize_start_file_variables): a `select` start variable with no usable (non-empty string) options is converted to a `text-input` the user can type into; a select that declares real options is normalized to those strings and kept. Idempotent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>