Skip to content

Commit 56ad2db

Browse files
committed
core: expose tool arguments in shell hook for plugin visibility
1 parent ae811ad commit 56ad2db

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/opencode/src/session/prompt.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ export namespace SessionPrompt {
454454
tool: "task",
455455
sessionID,
456456
callID: part.id,
457+
args: taskArgs,
457458
},
458459
result,
459460
)
@@ -805,6 +806,7 @@ export namespace SessionPrompt {
805806
tool: item.id,
806807
sessionID: ctx.sessionID,
807808
callID: ctx.callID,
809+
args,
808810
},
809811
result,
810812
)
@@ -850,6 +852,7 @@ export namespace SessionPrompt {
850852
tool: key,
851853
sessionID: ctx.sessionID,
852854
callID: opts.toolCallId,
855+
args,
853856
},
854857
result,
855858
)

packages/plugin/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export interface Hooks {
187187
) => Promise<void>
188188
"shell.env"?: (input: { cwd: string }, output: { env: Record<string, string> }) => Promise<void>
189189
"tool.execute.after"?: (
190-
input: { tool: string; sessionID: string; callID: string },
190+
input: { tool: string; sessionID: string; callID: string; args: any },
191191
output: {
192192
title: string
193193
output: string

0 commit comments

Comments
 (0)