/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2026. All rights reserved.
 */

#ifndef A2A_UTIL_MESSAGE
#define A2A_UTIL_MESSAGE

#include <string>
#include <vector>

#include "types.h"

namespace A2A {

Message NewAgentTextMessage(const std::string& text, const std::optional<std::string>& contextId = std::nullopt,
    const std::optional<std::string>& taskId = std::nullopt);

Message NewAgentPartsMessage(const std::vector<Part>& parts, const std::optional<std::string>& contextId = std::nullopt,
    const std::optional<std::string>& taskId = std::nullopt);

std::vector<std::string> GetTextParts(const std::vector<Part>& parts);

std::string GetMessageText(const Message& message, const std::string& delimiter = "\n");

} // namespace A2A

#endif