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

Consider adding text to Step events

Aperta
#346 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement proposal
Lingua principale
Python
Stelle
15.9k
Fork
1.4k
Merge medio
1g 17h
PR unite (30g)
163

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.