ag-ui-protocol / ag-ui-protocol/ag-ui

@ag-ui/client - textMessageBuffer not populated when emitting events directly

Ouverte
#888 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
bug SDK
Langage dominant
Python
Étoiles
15.9k
Forks
1.4k
Merge moyen
1 j 17 h
PR mergées (30 j)
163

Description

When extending AbstractAgent and emitting TEXT_MESSAGE_* events directly via the subscriber (not through HttpAgent with a server), the textMessageBuffer parameter passed to onTextMessageContentEvent is empty/undefined.

This appears to be because textMessageBuffer is computed by defaultApplyEvents which looks up the message content in the managed messages array. When events are emitted directly without going through defaultApplyEvents, no message objects are created, so the buffer lookup fails.

Questions:

Is this the intended behavior?
Should AbstractAgent maintain its own text buffer for direct event emission use cases?
Should the documentation clarify that textMessageBuffer only works when using the built-in event processing pipeline?

As a workaround I am manually accumulating deltas in an onEvent handler

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.