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

Consider adding text to Step events

Abierto
#346 4 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement proposal
Lenguaje dominante
Python
Estrellas
15.9k
Forks
1.4k
Merge medio
1 d 17 h
PR fusionados (30 d)
163

Descripción

### Motivation / Idea
If StepStartEvents and StepEndEvents are intended to signal some information to the UI about the processing, then let's assume we communicate that to the user in a visual way. There is a 'name' field, but this is not terribly useful for presentation as it really acts as an ID of the step since it is strictly validated for matching with StepEnd's name. So the start and end have the same name, making presentation awkward-sounding.

Let's say our step is a "search" event. I have to restrict the naming to work with both ends of the visual:
Instead of: `Started ${event.name}` and `Finished ${event.name}` I would much rather be able to output `${event.description}`, i.e. specific to this run of the step, so the server could add better info: i.e. `Searching for foobars...`, while retaining the 'name' for the ID/matching with End.

### Alternatives
Was asking about this on Discord and got a reply with options such as:
- use `rawEvent`; but this feels like not the intention of this bucket - doesn't fit the docs.
- Use STATE_SNAPSHOT/DELTA and read it after the event.; This also feels to me not in the spirit of the transient nature of the communication and then you have to deal with clearing it / sync'ing it for such a simple case.
- follow it with a CustomEvent; This either adds double boiler-plate to event processing or renders StepEvents of much less practical purpose if we ignore them and display the CustomEvent info instead

So I'd suggest a simple `text` or `description` field be added to, I suppose _all_ events, rather than workarounds.

Thanks for considering it

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.