diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts index f4793d1a7987..1e29b3633293 100644 --- a/packages/opencode/src/session/prompt.ts +++ b/packages/opencode/src/session/prompt.ts @@ -1702,14 +1702,14 @@ NOTE: At any point in time through this workflow you should feel free to ask the : await lastModel(input.sessionID) : taskModel - await Plugin.trigger( + const hookOutput = await Plugin.trigger( "command.execute.before", { command: input.command, sessionID: input.sessionID, arguments: input.arguments, }, - { parts }, + { parts, noReply: false }, ) const result = (await prompt({ @@ -1718,6 +1718,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the model: userModel, agent: userAgent, parts, + noReply: hookOutput.noReply, variant: input.variant, })) as MessageV2.WithParts diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index 36a4657d74c5..d5b721fdd1e0 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -175,7 +175,7 @@ export interface Hooks { "permission.ask"?: (input: Permission, output: { status: "ask" | "deny" | "allow" }) => Promise "command.execute.before"?: ( input: { command: string; sessionID: string; arguments: string }, - output: { parts: Part[] }, + output: { parts: Part[]; noReply?: boolean }, ) => Promise "tool.execute.before"?: ( input: { tool: string; sessionID: string; callID: string },