fix: title gen when first msg(s) are shell invocations (#4874)

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Aiden Cline
2025-11-28 09:55:22 -08:00
committed by GitHub
parent 96eda740cd
commit 17e8322c29
2 changed files with 5 additions and 3 deletions

View File

@@ -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")!,
message: msgs.find((m) => m.info.role === "user" && !m.parts.every((p) => "synthetic" in p && p.synthetic))!,
history: msgs,
})
@@ -1466,6 +1466,7 @@ export namespace SessionPrompt {
content: "Generate a title for this conversation:\n",
},
...MessageV2.toModelMessage([
...input.history,
{
info: {
id: Identifier.ascending("message"),