tweak: keep aborted msgs in context (#2583)

This commit is contained in:
Aiden Cline
2025-09-13 12:25:30 -05:00
committed by GitHub
parent f0e8b7c29b
commit 6506e48c54

View File

@@ -278,7 +278,11 @@ export namespace SessionPrompt {
content: x,
}),
),
...MessageV2.toModelMessage(msgs.filter((m) => !(m.info.role === "assistant" && m.info.error))),
...MessageV2.toModelMessage(
msgs.filter(
(m) => !(m.info.role === "assistant" && m.info.error && !MessageV2.AbortedError.isInstance(m.info.error)),
),
),
],
tools: model.info.tool_call === false ? undefined : tools,
model: wrapLanguageModel({