tweak: adjust plugin api to accept 'small' as an input for chat.headers hook

This commit is contained in:
Aiden Cline
2026-03-25 17:42:59 -05:00
parent cea7b7e182
commit f8232986d6
2 changed files with 9 additions and 1 deletions

View File

@@ -155,6 +155,7 @@ export namespace LLM {
model: input.model,
provider,
message: input.user,
small: input.small === true,
},
{
headers: {},

View File

@@ -187,7 +187,14 @@ export interface Hooks {
output: { temperature: number; topP: number; topK: number; options: Record<string, any> },
) => Promise<void>
"chat.headers"?: (
input: { sessionID: string; agent: string; model: Model; provider: ProviderContext; message: UserMessage },
input: {
sessionID: string
agent: string
model: Model
provider: ProviderContext
message: UserMessage
small: boolean
},
output: { headers: Record<string, string> },
) => Promise<void>
"permission.ask"?: (input: Permission, output: { status: "ask" | "deny" | "allow" }) => Promise<void>