dify/web/app
QuantumGhost 2c1ab4879f
refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025)
refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025)

This PR addresses serialization issues in the VariablePool model by separating the `value_type` tags for `IntegerSegment`/`FloatSegment` and `IntegerVariable`/`FloatVariable`. Previously, both Integer and Float types shared the same `SegmentType.NUMBER` tag, causing conflicts during serialization.

Key changes:
- Introduce distinct `value_type` tags for Integer and Float segments/variables
- Add `VariableUnion` and `SegmentUnion` types for proper type discrimination
- Leverage Pydantic's discriminated union feature for seamless serialization/deserialization
- Enable accurate serialization of data structures containing these types

Closes #22024.
2025-07-16 12:31:37 +08:00
..
(commonLayout) Improve Tooltip UX by enabling delay by default (#21383) 2025-07-16 11:26:54 +08:00
(shareLayout) reject whitespace characters in password regexp (#22232) 2025-07-11 19:18:18 +08:00
account reject whitespace characters in password regexp (#22232) 2025-07-11 19:18:18 +08:00
activate E-300 (#19726) 2025-05-20 12:07:50 +08:00
components refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 2025-07-16 12:31:37 +08:00
dev-only feat: add i18n checker (ui) (#17283) 2025-04-02 13:58:31 +08:00
dev-preview feat/TanStack-Form (#18346) 2025-04-18 15:54:22 +08:00
education-apply refactor: generalize method for getting doc link respecting locale and fix error link paths (#20801) 2025-06-13 10:58:43 +02:00
forgot-password reject whitespace characters in password regexp (#22232) 2025-07-11 19:18:18 +08:00
init E-300 (#19726) 2025-05-20 12:07:50 +08:00
install reject whitespace characters in password regexp (#22232) 2025-07-11 19:18:18 +08:00
oauth-callback feat: the frontend part of mcp (#22131) 2025-07-10 14:14:02 +08:00
repos/[owner]/[repo]/releases Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
reset-password reject whitespace characters in password regexp (#22232) 2025-07-11 19:18:18 +08:00
signin Improve Tooltip UX by enabling delay by default (#21383) 2025-07-16 11:26:54 +08:00
styles feat: prevent input of non-numeric values ​​in numer input (#21562) 2025-06-26 16:43:26 +08:00
layout.tsx feat: introduce new env ALLOW_UNSAFE_DATA_SCHEME to allow rendering data uri scheme (#21321) 2025-07-09 10:12:40 +08:00
page.module.css Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
page.tsx Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
routePrefixHandle.tsx Modifying the preview of the uploaded avatar will freeze, fix the bug… (#20202) 2025-05-27 14:04:22 +08:00