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.

feat(email): add include_signature override to the SendEmail AI tool (#4404)

Evan Hutnik73cf9921dfbd
diff --git a/js/app/packages/service-clients/service-cognition/generated/tools/schemas.ts b/js/app/packages/service-clients/service-cognition/generated/tools/schemas.ts
index 70895560cf..66d8d57b9f 100644
--- a/js/app/packages/service-clients/service-cognition/generated/tools/schemas.ts
+++ b/js/app/packages/service-clients/service-cognition/generated/tools/schemas.ts
@@ -2007,6 +2007,7 @@ export const SendEmail = z.object({
})
)
.optional(),
+ includeSignature: z.union([z.boolean(), z.null()]).default(null),
replyingToId: z.union([z.string().uuid(), z.null()]).default(null),
subject: z.string(),
to: z.array(
diff --git a/js/app/packages/service-clients/service-cognition/generated/tools/types.ts b/js/app/packages/service-clients/service-cognition/generated/tools/types.ts
index ccc6d5e060..886bbaf625 100644
--- a/js/app/packages/service-clients/service-cognition/generated/tools/types.ts
+++ b/js/app/packages/service-clients/service-cognition/generated/tools/types.ts
@@ -2649,6 +2649,13 @@ export interface SendEmail {
* Carbon copy recipients (optional).
*/
cc?: EmailRecipient[];
+ /**
+ * Per-message signature override, set by the composer's signature preview —
+ * not normally by you. Omit to use the inbox's default policy (always on a
+ * new email; on replies/forwards only when the user enabled it). `false`
+ * excludes the signature for this one email.
+ */
+ includeSignature?: boolean | null;
/**
* The ID of a message to reply to (optional). When set, the email is
* sent as a reply within the same thread.
diff --git a/rust/cloud-storage/email/src/inbound/toolset/send_email.rs b/rust/cloud-storage/email/src/inbound/toolset/send_email.rs
index 047aa9671a..aafd1c73dc 100644
--- a/rust/cloud-storage/email/src/inbound/toolset/send_email.rs
+++ b/rust/cloud-storage/email/src/inbound/toolset/send_email.rs
@@ -62,6 +62,12 @@ pub struct SendEmail {
/// sent as a reply within the same thread.
#[serde(default)]
pub replying_to_id: Option<Uuid>,
+ /// Per-message signature override, set by the composer's signature preview —
+ /// not normally by you. Omit to use the inbox's default policy (always on a
+ /// new email; on replies/forwards only when the user enabled it). `false`
+ /// excludes the signature for this one email.
+ #[serde(default)]
+ pub include_signature: Option<bool>,
}
/// Response from the SendEmail tool.
@@ -120,8 +126,9 @@ where
body_macro: None,
headers_json: None,
send_time: None,
- // None = let the backend apply the default signature policy.
- include_signature: None,
+ // Composer override when present; otherwise None lets the backend
+ // apply the default signature policy.
+ include_signature: self.include_signature,
};
let sent = service_context