Show live stage notes in activity panel
This commit is contained in:
@@ -911,6 +911,23 @@ function collectLiveRunItems(runStatus: ClawRunStatus | null) {
|
||||
}
|
||||
seenToolCalls.add(event.tool_call_id);
|
||||
const result = resultById.get(event.tool_call_id);
|
||||
const stageNote =
|
||||
typeof event.assistant_content === "string"
|
||||
? event.assistant_content.trim()
|
||||
: "";
|
||||
if (stageNote) {
|
||||
items.push({
|
||||
id: `live:${runStatus.run_id ?? runStatus.session_id ?? "active"}:${event.tool_call_id}:stage`,
|
||||
kind: "reasoning",
|
||||
title: "阶段说明",
|
||||
summary: stageNote,
|
||||
status: result
|
||||
? result.ok === false
|
||||
? "incomplete"
|
||||
: "complete"
|
||||
: "running",
|
||||
});
|
||||
}
|
||||
const resultSummary =
|
||||
typeof result?.metadata?.output_preview === "string"
|
||||
? result.metadata.output_preview
|
||||
|
||||
@@ -605,11 +605,8 @@ function summarizeRunEvents(runStatus: ClawActiveRunStatus) {
|
||||
? event.assistant_content.trim()
|
||||
: "";
|
||||
lines.push(
|
||||
stageNote.startsWith("进度:") || stageNote.startsWith("进度:")
|
||||
? stageNote
|
||||
: event.tool_name
|
||||
? `调用工具 ${event.tool_name}`
|
||||
: "正在调用工具",
|
||||
stageNote ||
|
||||
(event.tool_name ? `调用工具 ${event.tool_name}` : "正在调用工具"),
|
||||
);
|
||||
}
|
||||
if (event.type === "tool_result") {
|
||||
|
||||
Reference in New Issue
Block a user