summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-07-16 11:47:56 -0500
committerGitHub <[email protected]>2025-07-16 11:47:56 -0500
commit70229b150ccba9dbb0beb7149ae0b162449d7dea (patch)
treede4a0dac889a025cfded490e1d67e970e13bf8b6
parent050ff943a66c3e33979aa634d913420e124307b5 (diff)
downloadopencode-70229b150ccba9dbb0beb7149ae0b162449d7dea.tar.gz
opencode-70229b150ccba9dbb0beb7149ae0b162449d7dea.zip
Fix: better title generation (needs to change due to small models) (#1059)
-rw-r--r--packages/opencode/src/session/prompt/title.txt31
1 files changed, 23 insertions, 8 deletions
diff --git a/packages/opencode/src/session/prompt/title.txt b/packages/opencode/src/session/prompt/title.txt
index 46291dba6..ac82d60ab 100644
--- a/packages/opencode/src/session/prompt/title.txt
+++ b/packages/opencode/src/session/prompt/title.txt
@@ -1,14 +1,29 @@
<task>
-Generate a conversation thread title based on the first user message.
+Generate a conversation thread title from the user message.
</task>
-<requirements>
-- Maximum 50 characters
-- Single line only - NO newlines or line breaks
-- Create a descriptive thread name that captures the topic
-- No quotes, colons, or special formatting
-- Do not include explanatory text like "Title:" or similar prefixes
-</requirements>
+<context>
+You are generating titles for a coding assistant conversation.
+</context>
+
+<rules>
+- Max 50 chars, single line
+- Focus on the specific action or question
+- Keep technical terms, numbers, and filenames exactly as written
+- Preserve HTTP status codes (401, 404, 500, etc) as numbers
+- For file references, include the filename
+- Avoid filler words: the, this, my, a, an, properly
+- NEVER assume their tech stack or domain
+- Use -ing verbs consistently for actions
+- Write like a chat thread title, not a blog post
+</rules>
+
+<examples>
+"debug 500 errors in production" → "Debugging production 500 errors"
+"refactor user service" → "Refactoring user service"
+"why is app.js failing" → "Analyzing app.js failure"
+"implement rate limiting" → "Implementing rate limiting"
+</examples>
<format>
Return only the thread title text on a single line with no newlines, explanations, or additional formatting.