assistant-ui 让 AG-UI 工具界面随参数流渐进构建,并把规范提示先放入输入框
assistant-ui 于 11 月 24 日发布 @assistant-ui/react-ag-ui 0.1.13 与 generative-frame 0.0.12。AG-UI 运行时现在把每个 TOOL_CALL_ARGS 增量送入共享的增量 JSON 对象解析器,使表单、长文本与其他工具 UI 在参数尚未闭合时就逐步显示;规范工具包的默认 sendMessage 则把文本填入会话输入框,交给用户检查后发送。
为什么值得关注
流式工具参数若一直表现为空对象,生成式界面会在最后一个括号到达时突然跳变。渐进参数让界面更早反馈;把建议文本放入输入框则保留用户对外发消息的最终决定。
技术细节
实现为每个新工具调用建立增量解析器,持续发布当前可恢复的对象字段,并在完整容器闭合后仍用精确 JSON.parse 作为最终权威。测试覆盖分片键值、嵌套对象和无效尾随文本;无效容器回退为空参数。generative-frame 同批修复让规范工具包与 widget、MCP App 的提示行为一致。
适合哪些读者
使用 AG-UI、assistant-ui、工具表单、长参数流或用户确认式消息发送的团队。
原始来源
- assistant-ui official releases and implementation commits ↗github.com
- Composer staging implementation and tests ↗github.com
- Partial AG-UI tool argument implementation and tests ↗github.com
- generative-frame 0.0.12 release ↗github.com
修订与更正记录 (1)
— Merged the coordinated November 24 assistant-ui releases into one event because they address the same interactive boundary: progressive tool rendering and user-reviewed outbound prompts.