wp-includes/php-ai-client/src/Builders/PromptBuilder.php:1124Appends a MessagePart to the messages array.
$partWordPress\AiClient\Messages\DTO\MessagePartvoid protected function appendPartToMessages(MessagePart $part): void { $lastMessage = end($this->messages); if ($lastMessage instanceof Message && $lastMessage->getRole()->isUser()) { // Replace the last message with a new one containing the appended part array_pop($this->messages); $this->messages[] = $lastMessage->withPart($part); return; } // Create new UserMessage with the part $this->messages[] = new UserMessage([$part]); }Introduced in 0.1.0. Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/php-ai-client/src/Builders/PromptBuilder.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.