




















@@ -335,18 +335,39 @@ function formatChildResultData(resultText?: string | null): string {
335335);
336336}
337337338-export function buildChildCompletionFindings(
339-children: Array<{
340-childSessionKey: string;
341-task: string;
342-label?: string;
343-createdAt: number;
344-endedAt?: number;
345-completion?: {
346-resultText?: string | null;
338+type ChildCompletionRow = {
339+childSessionKey: string;
340+task: string;
341+label?: string;
342+createdAt: number;
343+endedAt?: number;
344+frozenResultText?: string | null;
345+completion?: {
346+resultText?: string | null;
347+fallbackResultText?: string | null;
348+};
349+delivery?: {
350+payload?: {
351+frozenResultText?: string | null;
352+fallbackFrozenResultText?: string | null;
347353};
348-outcome?: SubagentRunOutcome;
349-}>,
354+};
355+outcome?: SubagentRunOutcome;
356+};
357+358+function selectChildCompletionResultText(child: ChildCompletionRow): string | undefined {
359+return (
360+child.completion?.resultText ??
361+child.delivery?.payload?.frozenResultText ??
362+child.completion?.fallbackResultText ??
363+child.delivery?.payload?.fallbackFrozenResultText ??
364+child.frozenResultText ??
365+undefined
366+)?.trim();
367+}
368+369+export function buildChildCompletionFindings(
370+children: Array<ChildCompletionRow>,
350371): string | undefined {
351372const sorted = [...children].toSorted((a, b) => {
352373if (a.createdAt !== b.createdAt) {
@@ -359,7 +380,7 @@ export function buildChildCompletionFindings(
359380360381const sections: string[] = [];
361382for (const [index, child] of sorted.entries()) {
362-const resultText = child.completion?.resultText?.trim();
383+const resultText = selectChildCompletionResultText(child);
363384const outcome = describeSubagentOutcome(child.outcome);
364385if (
365386child.outcome?.status === "ok" &&
@@ -395,8 +416,16 @@ export function dedupeLatestChildCompletionRows(
395416label?: string;
396417createdAt: number;
397418endedAt?: number;
419+frozenResultText?: string | null;
398420completion?: {
399421resultText?: string | null;
422+fallbackResultText?: string | null;
423+};
424+delivery?: {
425+payload?: {
426+frozenResultText?: string | null;
427+fallbackFrozenResultText?: string | null;
428+};
400429};
401430outcome?: SubagentRunOutcome;
402431}>,
@@ -420,8 +449,16 @@ export function filterCurrentDirectChildCompletionRows(
420449label?: string;
421450createdAt: number;
422451endedAt?: number;
452+frozenResultText?: string | null;
423453completion?: {
424454resultText?: string | null;
455+fallbackResultText?: string | null;
456+};
457+delivery?: {
458+payload?: {
459+frozenResultText?: string | null;
460+fallbackFrozenResultText?: string | null;
461+};
425462};
426463outcome?: SubagentRunOutcome;
427464}>,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。