Skip to content

Include accumulated text in OnTextEnd callback #239

@carsonfarmer

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].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions