mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-10 18:58:48 +00:00
fix: title gen when first msg(s) are shell invocations (#4874)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user