Skip to content

Conversation

@jkmassel
Copy link
Contributor

@jkmassel jkmassel commented Oct 3, 2025

The support bot responses had some unexpected format differences between responses, so I'm properly handling these now.

@jkmassel jkmassel requested a review from oguzkocer October 3, 2025 04:06
jkmassel and others added 3 commits October 3, 2025 08:44
Add a new serde helper that specifically handles the case where a field
can be either an empty array or a valid object. This is more type-safe
than ok_or_default as it only handles the specific empty array case and
still propagates legitimate deserialization errors.

Changes:
- Add `DeserializeEmptyVecOrNone` visitor and `deserialize_empty_vec_or_none` helper
- Replace `ok_or_default` usage in `UserMessageContext.plan` field
- Helper properly deserializes `T` and wraps in `Some`, or returns `None` for empty arrays
@jkmassel jkmassel merged commit eb60a71 into trunk Oct 3, 2025
22 checks passed
@jkmassel jkmassel deleted the fix/support-response-parsing branch October 3, 2025 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants