Skip to content

Commit fe57d7b

Browse files
committed
tweak: title gen prompt & temp to avoid repetative 'Analyzing ...' titles
1 parent 68cf6b0 commit fe57d7b

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

packages/opencode/src/agent/agent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export namespace Agent {
140140
options: {},
141141
native: true,
142142
hidden: true,
143+
temperature: 0.5,
143144
permission: PermissionNext.merge(
144145
defaults,
145146
PermissionNext.fromConfig({

packages/opencode/src/agent/prompt/title.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ Your output must be:
1212
</task>
1313

1414
<rules>
15+
- Title must be grammatically correct and read naturally - no word salad
16+
- Never include tool names in the title (e.g. "read tool", "bash tool", "edit tool")
1517
- Focus on the main topic or question the user needs to retrieve
16-
- Use -ing verbs for actions (Debugging, Implementing, Analyzing)
18+
- Vary your phrasing - avoid repetitive patterns like always starting with "Analyzing"
19+
- When a file is mentioned, focus on WHAT the user wants to do WITH the file, not just that they shared it
1720
- Keep exact: technical terms, numbers, filenames, HTTP codes
1821
- Remove: the, this, my, a, an
1922
- Never assume tech stack
@@ -29,8 +32,12 @@ Your output must be:
2932
<examples>
3033
"debug 500 errors in production" → Debugging production 500 errors
3134
"refactor user service" → Refactoring user service
32-
"why is app.js failing" → Analyzing app.js failure
33-
"implement rate limiting" → Implementing rate limiting
34-
"how do I connect postgres to my API" → Connecting Postgres to API
35+
"why is app.js failing" → app.js failure investigation
36+
"implement rate limiting" → Rate limiting implementation
37+
"how do I connect postgres to my API" → Postgres API connection
3538
"best practices for React hooks" → React hooks best practices
39+
"@src/auth.ts can you add refresh token support" → Auth refresh token support
40+
"@utils/parser.ts this is broken" → Parser bug fix
41+
"look at @config.json" → Config review
42+
"@App.tsx add dark mode toggle" → Dark mode toggle in App
3643
</examples>

0 commit comments

Comments
 (0)