Compare commits

...

3 Commits

Author SHA1 Message Date
Aiden Cline
1bde2187c6 fix: pass directory param 2026-03-13 19:43:57 -05:00
Aiden Cline
f5755ffd6b slightly more reliable 2026-03-13 19:21:28 -05:00
Aiden Cline
d9dca9d1b3 tweak: ensure that compaction message is tracked as agent initiated 2026-03-13 18:53:07 -05:00

View File

@@ -309,6 +309,24 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
output.headers["anthropic-beta"] = "interleaved-thinking-2025-05-14"
}
const parts = await sdk.session
.message({
path: {
id: incoming.message.sessionID,
messageID: incoming.message.id,
},
query: {
directory: input.directory,
},
throwOnError: true,
})
.catch(() => undefined)
if (parts?.data.parts?.some((part) => part.type === "compaction")) {
output.headers["x-initiator"] = "agent"
return
}
const session = await sdk.session
.get({
path: {