For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/components/message-status.md.

消息状态

消息状态在单条消息旁报告有限的发送或生成状态,不把整个对话记录设为实时区域。

实时预览
正在生成回复已发送发送失败

用法

<output class="message-status" data-state="streaming" aria-live="polite">
  <span data-message-status-indicator aria-hidden="true"></span>
  <span data-message-status-label>正在生成回复</span>
</output>

参数

API取值用途
data-statesending、streaming、sent、queued、stopped、error有限消息状态
data-message-status-label必须文本状态
data-message-status-meta 或 <time>可选时间或紧凑元数据

状态与变体

只有消息确实保留并等待稍后提交时才使用 queued。错误状态应在可恢复时提供直接重试操作。

无障碍

仅在状态异步变化期间使用礼貌实时区域,不要播报每个流式字符。