Skip to content

Commit 5aa4fd0

Browse files
committed
core: add variant to chat.message input
1 parent b934c22 commit 5aa4fd0

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

packages/opencode/src/session/prompt.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ export namespace SessionPrompt {
10641064
agent: input.agent,
10651065
model: input.model,
10661066
messageID: input.messageID,
1067+
variant: input.variant,
10671068
},
10681069
{
10691070
message: info,

packages/plugin/src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,13 @@ export interface Hooks {
154154
* Called when a new message is received
155155
*/
156156
"chat.message"?: (
157-
input: { sessionID: string; agent?: string; model?: { providerID: string; modelID: string }; messageID?: string },
157+
input: {
158+
sessionID: string
159+
agent?: string
160+
model?: { providerID: string; modelID: string }
161+
messageID?: string
162+
variant?: string
163+
},
158164
output: { message: UserMessage; parts: Part[] },
159165
) => Promise<void>
160166
/**

0 commit comments

Comments
 (0)