Skip to content

Include accumulated text in OnTextEnd callback #239

Description

@carsonfarmer

Currently OnTextEndFunc receives only the message ID:

OnTextEndFunc func(id string) error

Consumers who need the full accumulated text (e.g., to collect or persist completed messages) must buffer all deltas themselves. This duplicates the internal activeTextContent map already maintained by the agent.

OnReasoningEndFunc already passes the full content:

OnReasoningEndFunc func(id string, reasoning ReasoningContent) error

Proposal: add the accumulated text as a second parameter:

OnTextEndFunc func(id string, text string) error

The text is already available at the call site from activeTextContent[part.ID].

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions