Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

419 B
Raw Blame
use super::message::{Message, OutgoingMessage};
use stream::domain::StreamItem;

const STREAM_MESSAGE_TYPE: &str = "stream";

impl TryFrom<StreamItem> for OutgoingMessage {
    type Error = serde_json::Error;
    fn try_from(value: StreamItem) -> Result<Self, Self::Error> {
        serde_json::to_string(&value)
            .map(|data| OutgoingMessage::Message(Message::new(STREAM_MESSAGE_TYPE.into(), data)))
    }
}