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

Consider adding text to Step events

未关闭
#346 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement proposal
主要语言
Python
星标
15.9k
派生
1.4k
平均合并
1 天 17 小时
30 天内合并 PR
163

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。