Improve long product-data generation runs
This commit is contained in:
@@ -566,8 +566,16 @@ function summarizeRunEvents(runStatus: ClawActiveRunStatus) {
|
||||
lines.push("后端已开始执行本轮任务。");
|
||||
}
|
||||
if (event.type === "tool_start") {
|
||||
const stageNote =
|
||||
typeof event.assistant_content === "string"
|
||||
? event.assistant_content.trim()
|
||||
: "";
|
||||
lines.push(
|
||||
event.tool_name ? `调用工具 ${event.tool_name}` : "正在调用工具",
|
||||
stageNote.startsWith("进度:") || stageNote.startsWith("进度:")
|
||||
? stageNote
|
||||
: event.tool_name
|
||||
? `调用工具 ${event.tool_name}`
|
||||
: "正在调用工具",
|
||||
);
|
||||
}
|
||||
if (event.type === "tool_result") {
|
||||
@@ -636,7 +644,6 @@ function getReplayMessages(
|
||||
const visibleMessages = isActiveRunStatus(runStatus)
|
||||
? messages.filter((message) => !isRunStatusMessage(message))
|
||||
: [...messages];
|
||||
if (isActiveRunStatus(runStatus)) return visibleMessages;
|
||||
return trimIncompleteReplayTail(visibleMessages);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user