| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1755a3f commit 5f57cee
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,7 @@ | |||
| 1 | 1 | --- | |
| 2 | 2 | description: git commit and push | |
| 3 | 3 | model: opencode/glm-4.6 | |
| 4 | + subtask: true | ||
| 4 | 5 | --- | |
| 5 | 6 | ||
| 6 | 7 | commit and push | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -396,6 +396,30 @@ export namespace SessionPrompt { | |||
| 396 | 396 | }, | |
| 397 | 397 | } satisfies MessageV2.ToolPart) | |
| 398 | 398 | } | |
| 399 | + | ||
| 400 | + // Add synthetic user message to prevent certain reasoning models from erroring | ||
| 401 | + // If we create assistant messages w/ out user ones following mid loop thinking signatures | ||
| 402 | + // will be missing and it can cause errors for models like gemini for example | ||
| 403 | + const summaryUserMsg: MessageV2.User = { | ||
| 404 | + id: Identifier.ascending("message"), | ||
| 405 | + sessionID, | ||
| 406 | + role: "user", | ||
| 407 | + time: { | ||
| 408 | + created: Date.now(), | ||
| 409 | + }, | ||
| 410 | + agent: lastUser.agent, | ||
| 411 | + model: lastUser.model, | ||
| 412 | + } | ||
| 413 | + await Session.updateMessage(summaryUserMsg) | ||
| 414 | + await Session.updatePart({ | ||
| 415 | + id: Identifier.ascending("part"), | ||
| 416 | + messageID: summaryUserMsg.id, | ||
| 417 | + sessionID, | ||
| 418 | + type: "text", | ||
| 419 | + text: "Summarize the task tool output above and continue with your task.", | ||
| 420 | + synthetic: true, | ||
| 421 | + } satisfies MessageV2.TextPart) | ||
| 422 | + | ||
| 399 | 423 | continue | |
| 400 | 424 | } | |
| 401 | 425 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments