mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-29 21:33:54 +00:00
tweak: ensure that compaction message is tracked as agent initiated (#17431)
This commit is contained in:
parent
8c53b2b470
commit
88226f3061
@ -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: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user