Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/server/src/git/Prompts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ describe("buildThreadTitlePrompt", () => {
expect(result.prompt).not.toContain("Attachment metadata:");
});

it("instructs title generation to preserve the user's language", () => {
const result = buildThreadTitlePrompt({
message: "Investigate inconsistent generated chat title language",
});

expect(result.prompt).toContain("Use the user's language; do not translate.");
});

it("includes attachment metadata when attachments are provided", () => {
const result = buildThreadTitlePrompt({
message: "Name this thread from the screenshot",
Expand Down
1 change: 1 addition & 0 deletions apps/server/src/git/Prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export function buildThreadTitlePrompt(input: ThreadTitlePromptInput) {
rules: [
"Title should summarize the user's request, not restate it verbatim.",
"Keep it short and specific (3-8 words).",
"Use the user's language; do not translate.",
"Avoid quotes, filler, prefixes, and trailing punctuation.",
"If images are attached, use them as primary context for visual/UI issues.",
],
Expand Down
Loading