summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-11-28 12:18:02 -0600
committerAiden Cline <[email protected]>2025-11-28 12:18:02 -0600
commit0e280017e6338201c6be6fb52f898779be2e18c1 (patch)
treed05f2835df55a4ab5027cab49a76daf3a15654d9
parent17e8322c2971e8f2fb7f0e16c2e9e57a1103c515 (diff)
downloadopencode-0e280017e6338201c6be6fb52f898779be2e18c1.tar.gz
opencode-0e280017e6338201c6be6fb52f898779be2e18c1.zip
Revert "fix: title gen when first msg(s) are shell invocations (#4874)"
This reverts commit 17e8322c2971e8f2fb7f0e16c2e9e57a1103c515.
-rw-r--r--packages/opencode/src/session/prompt.ts3
-rw-r--r--packages/opencode/src/session/prompt/title.txt5
2 files changed, 3 insertions, 5 deletions
diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts
index 6b2f74c45..9152fc99b 100644
--- a/packages/opencode/src/session/prompt.ts
+++ b/packages/opencode/src/session/prompt.ts
@@ -283,7 +283,7 @@ export namespace SessionPrompt {
session: await Session.get(sessionID),
modelID: lastUser.model.modelID,
providerID: lastUser.model.providerID,
- message: msgs.find((m) => m.info.role === "user" && !m.parts.every((p) => "synthetic" in p && p.synthetic))!,
+ message: msgs.find((m) => m.info.role === "user")!,
history: msgs,
})
@@ -1466,7 +1466,6 @@ export namespace SessionPrompt {
content: "Generate a title for this conversation:\n",
},
...MessageV2.toModelMessage([
- ...input.history,
{
info: {
id: Identifier.ascending("message"),
diff --git a/packages/opencode/src/session/prompt/title.txt b/packages/opencode/src/session/prompt/title.txt
index 3bc04f290..e297dc460 100644
--- a/packages/opencode/src/session/prompt/title.txt
+++ b/packages/opencode/src/session/prompt/title.txt
@@ -22,9 +22,8 @@ Your output must be:
- The title should NEVER include "summarizing" or "generating" when generating a title
- DO NOT SAY YOU CANNOT GENERATE A TITLE OR COMPLAIN ABOUT THE INPUT
- Always output something meaningful, even if the input is minimal.
-- Ignore tool execution messages ("Called the Read tool...", "The following tool was executed..."). Instead, focus on what the user wants to do with the context.
-- If the user message is short or conversational (e.g. "hello", "lol", "whats up", "hey"):
- → create a title that reflects the user's tone or intent (such as Greeting, Quick check-in, Light chat, Intro message, etc.)
+- If the user message is short or conversational (e.g. “hello”, “lol”, “whats up”, “hey”):
+ → create a title that reflects the user’s tone or intent (such as Greeting, Quick check-in, Light chat, Intro message, etc.)
</rules>
<examples>