Skip to content

fix: reply drafts honor Reply-To, add Re: and encode non-ASCII subjects - #12

Merged
TheGreatAxios merged 1 commit into
cl-9393-google-tools-align-repo-scaffolding-with-the-packagefrom
cl-9439-google-tools-reply-draft-headers
Sep 27, 2026
Merged

TheGreatAxios merged 1 commit into
cl-9393-google-tools-align-repo-scaffolding-with-the-packagefrom
cl-9439-google-tools-reply-draft-headers

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Closes CL-9439

Reply drafts (gmail_create_draft with replyToMessageId):

  • Address the original's Reply-To list when present, else its From. Replying to a message in SENT still goes to its first To recipient.
  • Prefix the inherited subject with Re: unless it already starts with Re: (any case).
  • to: [] counts as absent, so the reply recipients still apply.
  • Non-ASCII subjects are RFC 2047 encoded (=?UTF-8?B?…?=, folded into words of at most 75 characters).

The newline guards still run on every header value, including the Reply-To addresses. Every tool still asks for approval, and the public API is unchanged.

Tests in src/tools/create-tools.test.ts cover Reply-To, SENT, to: [], an existing RE:, and a long mixed-script subject. The Reply-To and encoding tests failed before the fix.

@TheGreatAxios
TheGreatAxios added this pull request to stack #9 September 27, 2026 00:46
@TheGreatAxios
TheGreatAxios merged commit d64d069 into main Sep 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant