Compare commits

...

5 Commits

Author SHA1 Message Date
Aiden Cline
2d0b7d9616 chore: rm model list change 2026-04-15 00:32:39 -05:00
Aiden Cline
fd9f340f6f tweak: add test and cleanup file 2026-04-15 00:31:10 -05:00
Aiden Cline
948ed7239b compaction change 2026-04-15 00:23:09 -05:00
Aiden Cline
2b7e64d300 commit test case 2026-04-15 00:04:49 -05:00
opencode-agent[bot]
1f279cd2c8 chore: update nix node_modules hashes 2026-04-15 03:47:58 +00:00
4 changed files with 18 additions and 5 deletions

View File

@@ -1,8 +1,8 @@
{
"nodeModules": {
"x86_64-linux": "sha256-3VYF84QGROFpwBCYDEWHDpRFkSHwmiVWQJR81/bqjYo=",
"aarch64-linux": "sha256-k12n4GqrjBqKqBvLjzXQhDxbc8ZMZ/1TenDp2pKh888=",
"aarch64-darwin": "sha256-OCRX1VC5SJmrXk7whl6bsdmlRwjARGw+4RSk8c59N10=",
"x86_64-darwin": "sha256-l+g/cMREarOVIK3a01+csC3Mk3ZfMVWAiAosSA5/U6Y="
"x86_64-linux": "sha256-gdS7MkWGeVO0qLs0HKD156YE0uCk5vWeYjKu4JR1Apw=",
"aarch64-linux": "sha256-tF4pyVqzbrvdkRG23Fot37FCg8guRZkcU738fHPr/OQ=",
"aarch64-darwin": "sha256-FugTWzGMb2ktAbNwQvWRM3GWOb5RTR++8EocDDrQMLc=",
"x86_64-darwin": "sha256-jpe6EiwKr+CS00cn0eHwcDluO4LvO3t/5l/LcFBBKP0="
}
}

View File

@@ -355,7 +355,15 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
})
.catch(() => undefined)
if (parts?.data.parts?.some((part) => part.type === "compaction")) {
if (
parts?.data.parts?.some(
(part) =>
part.type === "compaction" ||
// Auto-compaction resumes via a synthetic user text part. Treat only
// that marked followup as agent-initiated so manual prompts stay user-initiated.
(part.type === "text" && part.synthetic && part.metadata?.compaction_continue === true),
)
) {
output.headers["x-initiator"] = "agent"
return
}

View File

@@ -345,6 +345,10 @@ When constructing the summary, try to stick to this template:
messageID: continueMsg.id,
sessionID: input.sessionID,
type: "text",
// Internal marker for auto-compaction followups so provider plugins
// can distinguish them from manual post-compaction user prompts.
// This is not a stable plugin contract and may change or disappear.
metadata: { compaction_continue: true },
synthetic: true,
text,
time: {

View File

@@ -843,6 +843,7 @@ describe("session.compaction.process", () => {
expect(last?.parts[0]).toMatchObject({
type: "text",
synthetic: true,
metadata: { compaction_continue: true },
})
if (last?.parts[0]?.type === "text") {
expect(last.parts[0].text).toContain("Continue if you have next steps")