fix(web-probe): keep attributed final response checks across prompts (#761)
* fix(web-probe): keep attributed final response checks across prompts * fix(web-probe): trust terminal message final text --------- Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
@@ -5413,7 +5413,7 @@ function hasFinalResponseAfterCompletion(samples, timeline, event) {
|
||||
const eventSession = event.routeSessionId || event.activeSessionId || null;
|
||||
if (sampleSession && eventSession && sampleSession !== eventSession) continue;
|
||||
const promptIndex = timeline[index]?.promptIndex ?? 0;
|
||||
if (event.promptIndex && promptIndex !== event.promptIndex) continue;
|
||||
if (!event.traceId && !event.messageId && event.promptIndex && promptIndex !== event.promptIndex) continue;
|
||||
if (sampleHasVisibleFinalResponse(sample, event)) return true;
|
||||
}
|
||||
return false;
|
||||
@@ -5427,8 +5427,8 @@ function sampleHasVisibleFinalResponse(sample, event = {}) {
|
||||
if (event.messageId && item?.messageId && item.messageId !== event.messageId) continue;
|
||||
const text = normalizedText([item?.text, item?.textPreview].filter(Boolean).join(" "));
|
||||
if (text.length < 24) continue;
|
||||
if (isDiagnosticText(text)) continue;
|
||||
if (groupName === "messages" && isTerminalTurnStatus(item?.status)) return true;
|
||||
if (isDiagnosticText(text)) continue;
|
||||
if (isFinalResultText(text)) return true;
|
||||
if (/运行记录/iu.test(text) && /(?:已完成|完成|新增|实现|验证|测试|结果|README|文件|summary)/iu.test(text)) return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user