Skip to content

Commit 137e964

Browse files
authored
fix: session title generation (anomalyco#293)
1 parent 8efbe49 commit 137e964

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

packages/opencode/src/provider/transform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CoreMessage, LanguageModelV1Prompt } from "ai"
1+
import type { LanguageModelV1Prompt } from "ai"
22
import { unique } from "remeda"
33

44
export namespace ProviderTransform {
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
You will generate a short title based on the first message a user begins a conversation with
2-
- ensure it is not more than 50 characters long
3-
- the title should be a summary of the user's message
4-
- it should be one line long
5-
- do not use quotes or colons
6-
- the entire text you return will be used as the title
7-
- never return anything that is more than one sentence (one line) long
1+
Generate a short title based on the first message a user begins a conversation with. CRITICAL: Your response must be EXACTLY one line with NO line breaks, newlines, or multiple sentences.
2+
3+
Requirements:
4+
- Maximum 50 characters
5+
- Single line only - NO newlines or line breaks
6+
- Summary of the user's message
7+
- No quotes, colons, or special formatting
8+
- Do not include explanatory text like "summary:" or similar
9+
- Your entire response becomes the title
10+
11+
IMPORTANT: Return only the title text on a single line. Do not add any explanations, formatting, or additional text.

0 commit comments

Comments
 (0)