fix: 支持模型异常后继续文档对话

- 将本轮文档上下文纳入可持久化的 Agent 用户消息

=- 在异常提示中提供请重试动作并自动发送继续
This commit is contained in:
2026-08-26 22:55:20 +08:00
parent 619b60600d
commit 1c68e3582c
11 changed files with 311 additions and 49 deletions

View File

@@ -18,6 +18,7 @@ import { easyFlowAguiCustomEvent } from './custom-events';
export interface AguiTimelineProjectionOptions {
finishedAt?: number;
onInputAccepted?: (payload: Record<string, unknown>) => Promise<void> | void;
runErrorMessage?: string;
roundId?: string;
startedAt?: number;
}
@@ -361,7 +362,7 @@ export function applyAguiEventToTimeline(
}
ChatTimelineBuilder.appendError(
items,
event.message || '请求失败',
options.runErrorMessage || event.message || '请求失败',
metadata(options, state),
);
ChatTimelineBuilder.finalize(items, {