Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
#![allow(deprecated)]
use model::chat::ChatMessageWithAttachments;
use model_entity::Entity;
use serde::{Deserialize, Serialize};
use unfurl_service::GetUnfurlResponse;
use utoipa::ToSchema;
#[derive(sqlx::FromRow, Serialize, Deserialize, Eq, PartialEq, Debug, Clone, ToSchema)]
#[serde(rename_all = "camelCase")]
pub struct ChatResponse {
/// The chat uuid
pub id: String,
/// Who the chat belongs to
pub user_id: String,
/// The project id the chat belongs to
pub project_id: Option<String>,
/// The name of the Chat
pub name: String,
/// The messages in the chat
pub messages: Vec<ChatMessageWithAttachments>,
/// The model used to generate the chat (`provider/model` id)
pub model: Option<String>,
/// The time the chat was created
pub created_at: Option<chrono::DateTime<chrono::Utc>>,
/// The time the chat was last updated
pub updated_at: Option<chrono::DateTime<chrono::Utc>>,
/// attachment context - attachments not attached to messages
#[deprecated(note = "Attachments are now stateless and no longer float until message send")]
pub attachments: Vec<Entity<'static>>,
/// Current number of tokens in the chat
// kill
pub token_count: Option<i64>,
/// message_id - web citation list
// kill
pub web_citations: Vec<(String, Vec<GetUnfurlResponse>)>,
/// whether the chat is persistent or not
// kill
pub is_persistent: bool,
}