diff options
| author | Mathias Beugnon <[email protected]> | 2025-11-09 06:29:27 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-08 23:29:27 -0600 |
| commit | d85eb1b880f288cd89d6ade9ccc30640df6c352e (patch) | |
| tree | 72d1e33a3d7787733984d0cc045ed754fd00adb4 /packages/plugin/src | |
| parent | 9637d704070782166a00262aa04b10353d2ebc03 (diff) | |
| download | opencode-d85eb1b880f288cd89d6ade9ccc30640df6c352e.tar.gz opencode-d85eb1b880f288cd89d6ade9ccc30640df6c352e.zip | |
feat: add input context to chat.params and chat.message (#4085)
Diffstat (limited to 'packages/plugin/src')
| -rw-r--r-- | packages/plugin/src/index.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index f103749bd..4b187efe7 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -143,12 +143,15 @@ export interface Hooks { /** * Called when a new message is received */ - "chat.message"?: (input: {}, output: { message: UserMessage; parts: Part[] }) => Promise<void> + "chat.message"?: ( + input: { sessionID: string; agent?: string; model?: { providerID: string; modelID: string; messageID?: string } }, + output: { message: UserMessage; parts: Part[] }, + ) => Promise<void> /** * Modify parameters sent to LLM */ "chat.params"?: ( - input: { model: Model; provider: Provider; message: UserMessage }, + input: { sessionID: string; agent: string; model: Model; provider: Provider; message: UserMessage }, output: { temperature: number; topP: number; options: Record<string, any> }, ) => Promise<void> "permission.ask"?: (input: Permission, output: { status: "ask" | "deny" | "allow" }) => Promise<void> |
