fix: 区分助手实时进度与最终正文
This commit is contained in:
+2
-2
@@ -633,7 +633,7 @@ export function summarizeQueueAttemptListResult(result: JsonValue, taskId: strin
|
||||
function summarizeRunEvent(event: JsonRecord, summaryChars: number): JsonRecord {
|
||||
const payload = jsonRecordValue(event.payload) ?? {};
|
||||
const type = stringValue(event.type) ?? "unknown";
|
||||
const messageEvent = type === "user_message" || type === "assistant_message";
|
||||
const messageEvent = type === "user_message" || type === "assistant_progress" || type === "assistant_message";
|
||||
const command = messageEvent ? null : boundedSummaryString(stringValue(payload.command), Math.min(summaryChars, 240));
|
||||
const text = messageEvent ? boundedSummaryString(stringValue(payload.text), summaryChars) : null;
|
||||
const outputSummary = boundedSummaryString(stringValue(payload.outputSummary) ?? nestedSummaryText(payload), summaryChars);
|
||||
@@ -668,7 +668,7 @@ function summarizeRunEvent(event: JsonRecord, summaryChars: number): JsonRecord
|
||||
|
||||
function isDefaultVisibleSessionEvent(item: JsonRecord): boolean {
|
||||
const type = stringValue(item.type);
|
||||
return type === "user_message" || type === "assistant_message" || type === "tool_call" || type === "error";
|
||||
return type === "user_message" || type === "assistant_progress" || type === "assistant_message" || type === "tool_call" || type === "error";
|
||||
}
|
||||
|
||||
function summarizeSuppressedSessionEvents(all: JsonRecord[], visible: JsonRecord[]): JsonRecord {
|
||||
|
||||
Reference in New Issue
Block a user