mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tweak: keep aborted msgs in context (#2583)
This commit is contained in:
parent
f0e8b7c29b
commit
6506e48c54
1 changed files with 5 additions and 1 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue