Skip to content

fix(group-chat): handle incomplete agent replies gracefully#1625

Open
kimbluerain wants to merge 1 commit into
EKKOLearnAI:mainfrom
kimbluerain:fix/1450-incomplete-reply
Open

fix(group-chat): handle incomplete agent replies gracefully#1625
kimbluerain wants to merge 1 commit into
EKKOLearnAI:mainfrom
kimbluerain:fix/1450-incomplete-reply

Conversation

@kimbluerain

Copy link
Copy Markdown
Contributor

群聊中 agent 回复说话说一半就停下的情况下,Web UI 现在能保留已有内容并标记为不完整。

修复:

  • 服务端 emitMessageStreamEnd 接受可选 finishReason 参数
  • 正常完成传 'stop',异常中断传 'error'
  • 客户端收到 finishReason !== 'stop' 时标记 isIncomplete: true
  • 内容末尾追加 "⚠️ [回复中断]" 提示

注意:这是前端体验改进,根治需要上游 Hermes Agent 修复流中断问题。

When agent streams end abnormally (error, context limit, timeout), the
Web UI now preserves the partial content and marks the message with
incomplete indicator instead of silently discarding it.

- emitMessageStreamEnd accepts optional finishReason param
- Error/catch paths pass finishReason=error
- Normal paths pass finishReason=stop
- Client marks isIncomplete on non-stop stream termination
- Partial content preserved with warning suffix appended

Refs EKKOLearnAI#1450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant