Skip to content

[upstream #16961] PR 16961: Include the ask-user part in the stored content union #320

Open

Description

@berry-13

Codex finding on LibreChat-AI#16961: LibreChat-AI#16961 (comment)

The client writes a synthetic ask_user_question part into TMessage.content to render an ask-user pause, but TMessageContentParts does not include it. This predates LibreChat-AI#16961: client/src/utils/approval.ts documents the gap and reads the type through a cast in isAskUserQuestionPart. LibreChat-AI#16961 shares the shape as AskUserQuestionContentPart in packages/data-provider/src/parts.ts, and fromUIPart returns it as TMessageContentParts through a cast.

Runtime behavior is correct (the part round-trips losslessly), so this is type debt: add the part to the stored content union (or a dedicated TMessage.content element type), then drop the casts in fromUIPart, isAskUserQuestionPart and the specs. Widening the union reaches every exhaustive switch over content types in the client, so it is its own change.

Activity

  1. added
    refactorreviewctl followups state
    area: clientreviewctl followups state
    readyreviewctl followups state
    and removed on Oct 10, 2026
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: clientreviewctl followups statearea: packagesreviewctl followups statereadyreviewctl followups staterefactorreviewctl followups state

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions