feat: add tool plugin param type date and date-picker - #36163
Merged
Conversation
zyqzyq
requested review from
CodingOnStar,
Mairuis,
QuantumGhost,
Stream29,
Yessenia-d,
Yeuoly,
iamjoel,
laipz8200,
zhsama and
zxhlyh
as code owners
May 14, 2026 06:42
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-08-06 08:07:59.249481843 +0000
+++ /tmp/pyrefly_pr.txt 2026-08-06 08:07:45.545250846 +0000
@@ -423,7 +423,7 @@
ERROR Argument `list[SimpleNamespace]` is not assignable to parameter `tidb_serverless_list` with type `Sequence[TidbAuthBinding]` in function `dify_vdb_tidb_on_qdrant.tidb_service.TidbService.batch_update_tidb_serverless_cluster_status` [bad-argument-type]
--> providers/vdb/vdb-tidb-on-qdrant/tests/unit_tests/test_tidb_service.py:297:65
ERROR Object of class `ModuleType` has no attribute `VectorType` [missing-attribute]
- --> providers/vdb/vdb-tidb-vector/tests/unit_tests/test_tidb_vector.py:75:5
+ --> providers/vdb/vdb-tidb-vector/tests/unit_tests/test_tidb_vector.py:74:5
ERROR Object of class `ModuleType` has no attribute `Vector` [missing-attribute]
--> providers/vdb/vdb-upstash/tests/unit_tests/test_upstash_vector.py:33:5
ERROR Object of class `ModuleType` has no attribute `Index` [missing-attribute]
|
Contributor
Pyrefly Type Coverage
|
Closed
This was referenced Aug 7, 2026
Contributor
|
Hi @zyqzyq I use some exist compoents instead of
|
hjlarry
approved these changes
Aug 7, 2026
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
Fixes #<issue number>.Fixes #36162
Summary
This change adds first-class support for
dateanddate-pickertool/plugin parameter types end to end: schema normalization, backend typing/casting, workflow UI (tool node, variable picker, constant field, trigger form), plugin reasoning configuration, and i18n. Values fordateare handled as a single calendar day (string);date-pickerrepresents an optional start/end range serialized as a JSON string/object consistent with backend casting.Backend
CommonParameterTypewithDATEandDATE_PICKER(api/core/entities/parameter_entities.py).PluginParameterType/ToolParameterTypeandcast_parameter_value/as_normal_typelogic fordateanddate-picker(api/core/plugin/entities/parameters.py,api/core/tools/entities/tool_entities.py).date-pickercasting edge cases (api/tests/unit_tests/core/entities/test_entities_parameter_entities.py).Frontend
FormTypeEnum.dateandFormTypeEnum.datePicker(declarations.ts) and schema mapping into-form-schema.ts(including aliases such asdatepicker→date-picker).toolDeclarativeTypeMatchesinform-input-item.helpers.ts(used by form input, variable picker, reasoning config, and input variable list).form-input-item.tsxrenders a native date input fordateandToolDateRangePickerfordate-picker(timezone from app context).constant-field.tsx,input-var-list.tsx,tool-form/item.tsx, andtrigger-plugin/.../trigger-form/item.tsxupdated for labels, tooltips, and picker behavior.var-reference-picker.tsx/var-reference-picker.trigger.tsxforce constant mode fordate-pickerand hide the mixed constant/variable type switch where inappropriate.reasoning-config-form.tsx+reasoning-config-form.helpers.tsaligned with the same types, filters, andToolDateRangePicker.tool-date-range-picker.tsx,tool-date-range-value.ts(parse/stringify range payload);cnfrom@langgenius/dify-ui/cnfor bundler compatibility.nodes.tool.dateRange.*inweb/i18n/en-US/workflow.jsonandweb/i18n/zh-Hans/workflow.json.form-input-item.helpers.spec.ts,reasoning-config-form.helpers.spec.tsfor declarative matching and date / date-picker behavior.Screenshots
date/date-pickerin provider YAML were not rendered with dedicated controls in the workflow tool node and related pickers.(Replace the table cells with embedded images if you attach screenshots in the PR.)
Checklist
make lint && make type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods