957
}];
958
}
960
>
const labels = collabAgentToolLabels(params.item.tool);
961
>
const success = params.item.status === 'completed';
962
>
const output = collabAgentResultOutput(params.item.receiverThreadIds, params.item.agentsStates) || entry.output;
963
>
const content = output ? [{ type: ToolResultContentType.Text as const, text: output }] : undefined;
964
>
return [{
965
>
type: ActionType.ChatToolCallComplete,
966
>
turnId: entry.turnId,
967
>
toolCallId: entry.toolCallId,
968
>
result: {
969
>
success,
970
>
pastTenseMessage: success ? labels.past : `${labels.displayName} failed`,
971
>
content,
972
>
...(success ? {} : { error: { message: `Collab agent ${params.item.status}`, ...(declined ? { code: 'denied' } : {}) } }),
973
>
},
974
>
}];
975
>
}
976
return [];
977
}