Skip to content

[upstream #16374] #16374: clearing an attachment filename through the UI parts view is not persisted #147

Description

@berry-13

Follow-up from LibreChat-AI#16374 (finding LibreChat-AI#16374 (comment)).

applyFileEdits in packages/data-provider/src/parts.ts only writes filename when the view part defines one, so removing the filename from a mapped attachment or image_file part through the UI view leaves the stored filename in place. The forward mapping always mirrors the stored filename onto the part, so the edit rule can compare directly: when part.filename !== file.filename, set it, deleting the field when the part has none.

Acceptance: an attachment whose view part drops filename maps back without filename, and an untouched part still round-trips strictly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: packagesreviewctl followups statebugSomething isn't workingreadyreviewctl followups state

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions