Preserve language in generated thread titles#2446
Preserve language in generated thread titles#2446alievk wants to merge 1 commit intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved This PR adds a single prompt instruction to preserve the user's language in generated thread titles, along with a corresponding test. The change is purely additive text guidance with no logic or schema changes. You can customize Macroscope's approvability policy. Learn more. |
What Changed
Updated the thread title generation prompt to preserve the user's language.
Added prompt coverage to ensure the instruction stays present.
Why
Thread titles are generated from the user's first message, but the prompt did not specify which language to use. As a result, titles for non-English requests could be generated inconsistently in either the user's language or English.
Keeping the instruction in the prompt is the smallest fix because title generation already happens there, and this avoids adding language detection or UI-side special cases.
Checklist
Before
After
Note
Low Risk
Low risk: only adjusts the LLM prompt text for thread title generation and adds a unit test to prevent regressions; no auth, data handling, or control-flow changes.
Overview
Thread title generation now explicitly instructs the model to use the user’s language and not translate by adding a new rule to
buildThreadTitlePrompt.Adds a focused test in
Prompts.test.tsto assert the language-preservation instruction remains present in the generated prompt.Reviewed by Cursor Bugbot for commit 8eef0c4. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Preserve user language in generated thread titles
Adds the rule "Use the user's language; do not translate." to the
buildThreadTitlePromptfunction in Prompts.ts, preventing the model from translating thread titles into another language.Macroscope summarized 8eef0c4.