fix(session-title): improve prompt

bad case:
when i start the session with a skill reference, llm returns XML
This commit is contained in:
Turtle
2026-07-27 17:47:48 +08:00
committed by GitHub
parent c59ea13c2e
commit ac1431e4f5

View File

@@ -191,7 +191,7 @@ function resolveRoute(
function systemPrompt(config: ResolvedSessionTitleLlmConfig): string {
return [
'Create a concise title for an AI coding-assistant session from the supplied human messages.',
'Return only the title on one line, with no quotes, prefix, explanation, Markdown, or terminal control codes.',
'Return only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.',
'Use the language of the messages.',
`Aim for about ${config.targetWords} words in non-CJK languages or ${config.targetCjkCharacters} CJK characters.`,
].join('\n')