Skip to content

Comments

Draft language mismatch#1354

Draft
elie222 wants to merge 1 commit intomainfrom
cursor/INB-37-draft-language-mismatch-182a
Draft

Draft language mismatch#1354
elie222 wants to merge 1 commit intomainfrom
cursor/INB-37-draft-language-mismatch-182a

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Jan 20, 2026

User description

Ensure auto-generated drafts match the email thread's language by adding explicit instructions to AI prompts and new language-specific tests.


Linear Issue: INB-37

Open in Cursor Open in Web


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Ensures that AI-generated email replies and follow-ups match the language of the existing conversation by updating system prompts. Introduces automated tests to verify language detection and response generation in Spanish, French, and German.

TopicDetails
Language Logic Update the systemPrompt in aiDraftReply and aiDraftFollowUp to explicitly instruct the AI to detect and match the thread's language.
Modified files (2)
  • apps/web/utils/ai/reply/draft-follow-up.ts
  • apps/web/utils/ai/reply/draft-reply.ts
Latest Contributors(0)
UserCommitDate
Language Testing Add comprehensive test cases to validate that the AI correctly generates responses in Spanish, French, and German when provided with non-English email threads.
Modified files (2)
  • apps/web/__tests__/ai/reply/draft-follow-up.test.ts
  • apps/web/__tests__/ai/reply/draft-reply.test.ts
Latest Contributors(0)
UserCommitDate
This pull request is reviewed by Baz. Review like a pro on (Baz).

Add language matching instruction to both draft-follow-up and draft-reply
prompts to ensure AI-generated drafts are written in the same language
as the email thread, instead of defaulting to English.

Fixes INB-37

Co-authored-by: eliesteinbock <eliesteinbock@gmail.com>
@cursor
Copy link

cursor bot commented Jan 20, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
inbox-zero Ready Ready Preview Jan 20, 2026 7:38pm

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants