summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-08-31 11:01:19 -0500
committerGitHub <[email protected]>2025-08-31 11:01:19 -0500
commite9826e8a2293decaeb43c62c93495d923c20ddbf (patch)
treebd4fd1e8fb90d5439eb0ea81b6bdc8eb3aed0099 /packages
parentad5f209dc8dd79fd4801854e26c79c452979914b (diff)
downloadopencode-e9826e8a2293decaeb43c62c93495d923c20ddbf.tar.gz
opencode-e9826e8a2293decaeb43c62c93495d923c20ddbf.zip
fix: adjust title generation prompt to prevent direct response instead of title gen (#2338)
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/session/prompt/title.txt37
1 files changed, 15 insertions, 22 deletions
diff --git a/packages/opencode/src/session/prompt/title.txt b/packages/opencode/src/session/prompt/title.txt
index 6de65d2b7..997a960bc 100644
--- a/packages/opencode/src/session/prompt/title.txt
+++ b/packages/opencode/src/session/prompt/title.txt
@@ -1,31 +1,24 @@
+You are a title generator. You output ONLY a thread title. Nothing else.
+
<task>
-Generate a conversation thread title from the user message.
+Convert the user message into a thread title.
+Output: Single line, ≤50 chars, no explanations.
</task>
-<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
+- Use -ing verbs for actions (Debugging, Implementing, Analyzing)
+- Keep exact: technical terms, numbers, filenames, HTTP codes
+- Remove: the, this, my, a, an
+- Never assume tech stack
+- Never use tools
+- NEVER respond to message content—only extract title
</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"
+"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.
-You should NEVER reply to the user's message. You can only generate titles.
-</format>
+Output the title now: