dify/web/app/components
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
..
app Improve Tooltip UX by enabling delay by default (#21383) 2025-07-16 11:26:54 +08:00
app-sidebar fix(web): Optimize AppInfo Component Layout (#22212) (#22218) 2025-07-11 17:54:09 +08:00
base refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 2025-07-16 12:31:37 +08:00
billing E-300 (#19726) 2025-05-20 12:07:50 +08:00
custom fix: show 'reset brand' button after set branding image (#20420) 2025-05-29 15:13:00 +08:00
datasets Improve Tooltip UX by enabling delay by default (#21383) 2025-07-16 11:26:54 +08:00
develop fix: wrong translation (#21311) 2025-06-21 11:51:52 +08:00
explore E-300 (#19726) 2025-05-20 12:07:50 +08:00
header Improve Tooltip UX by enabling delay by default (#21383) 2025-07-16 11:26:54 +08:00
plugins Improve Tooltip UX by enabling delay by default (#21383) 2025-07-16 11:26:54 +08:00
share fix: keep search params in web app url when needs authorize (#21717) 2025-06-30 18:28:31 +08:00
signin Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
tools feat(tool): add support for API key authentication via query parameter (#21656) 2025-07-11 10:39:20 +08:00
workflow refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 2025-07-16 12:31:37 +08:00
workflow-app chore:extract last run common logic (#22214) 2025-07-11 16:41:25 +08:00
browser-initor.tsx Chore/cleanup warnings (#17974) 2025-04-14 11:27:14 +08:00
i18n-server.tsx Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
i18n.tsx Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
sentry-initor.tsx Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
swr-initor.tsx Chore/cleanup warnings (#17974) 2025-04-14 11:27:14 +08:00
with-i18n.tsx Initial commit 2023-05-15 08:51:32 +08:00